summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtheme/assets/print.css2
-rwxr-xr-xtheme/stylesheets/ebook.less6
-rw-r--r--theme/templates/page.html18
3 files changed, 20 insertions, 6 deletions
diff --git a/theme/assets/print.css b/theme/assets/print.css
index 3a8125b..ec90288 100755
--- a/theme/assets/print.css
+++ b/theme/assets/print.css
@@ -1 +1 @@
-.link-inherit{color:inherit}.link-inherit:hover,.link-inherit:focus{color:inherit}.hljs-comment,.hljs-title{color:#8e908c}.hljs-variable,.hljs-attribute,.hljs-tag,.hljs-regexp,.ruby .hljs-constant,.xml .hljs-tag .hljs-title,.xml .hljs-pi,.xml .hljs-doctype,.html .hljs-doctype,.css .hljs-id,.css .hljs-class,.css .hljs-pseudo{color:#c82829}.hljs-number,.hljs-preprocessor,.hljs-pragma,.hljs-built_in,.hljs-literal,.hljs-params,.hljs-constant{color:#f5871f}.ruby .hljs-class .hljs-title,.css .hljs-rules .hljs-attribute{color:#eab700}.hljs-string,.hljs-value,.hljs-inheritance,.hljs-header,.ruby .hljs-symbol,.xml .hljs-cdata{color:#718c00}.css .hljs-hexcolor{color:#3e999f}.hljs-function,.python .hljs-decorator,.python .hljs-title,.ruby .hljs-function .hljs-title,.ruby .hljs-title .hljs-keyword,.perl .hljs-sub,.javascript .hljs-title,.coffeescript .hljs-title{color:#4271ae}.hljs-keyword,.javascript .hljs-function{color:#8959a8}.hljs{display:block;background:white;color:#4d4d4c;padding:.5em}.coffeescript .javascript,.javascript .xml,.tex .hljs-formula,.xml .javascript,.xml .vbscript,.xml .css,.xml .hljs-cdata{opacity:.5}.book-chapter{display:none}article{page-break-after:always}pre,blockquote{border:1px solid #999;page-break-inside:avoid;background:#f1f1f1;padding:8px}img{max-width:100%!important;page-break-inside:avoid;margin:0 auto}.exercise{margin:1cm 0;padding:.4cm;page-break-inside:avoid;border:3px solid #ddd}.exercise .exercise-header{margin-bottom:.4cm;padding-bottom:.2cm;border-bottom:1px solid #ddd} \ No newline at end of file
+.link-inherit{color:inherit}.link-inherit:hover,.link-inherit:focus{color:inherit}.hljs-comment,.hljs-title{color:#8e908c}.hljs-variable,.hljs-attribute,.hljs-tag,.hljs-regexp,.ruby .hljs-constant,.xml .hljs-tag .hljs-title,.xml .hljs-pi,.xml .hljs-doctype,.html .hljs-doctype,.css .hljs-id,.css .hljs-class,.css .hljs-pseudo{color:#c82829}.hljs-number,.hljs-preprocessor,.hljs-pragma,.hljs-built_in,.hljs-literal,.hljs-params,.hljs-constant{color:#f5871f}.ruby .hljs-class .hljs-title,.css .hljs-rules .hljs-attribute{color:#eab700}.hljs-string,.hljs-value,.hljs-inheritance,.hljs-header,.ruby .hljs-symbol,.xml .hljs-cdata{color:#718c00}.css .hljs-hexcolor{color:#3e999f}.hljs-function,.python .hljs-decorator,.python .hljs-title,.ruby .hljs-function .hljs-title,.ruby .hljs-title .hljs-keyword,.perl .hljs-sub,.javascript .hljs-title,.coffeescript .hljs-title{color:#4271ae}.hljs-keyword,.javascript .hljs-function{color:#8959a8}.hljs{display:block;background:white;color:#4d4d4c;padding:.5em}.coffeescript .javascript,.javascript .xml,.tex .hljs-formula,.xml .javascript,.xml .vbscript,.xml .css,.xml .hljs-cdata{opacity:.5}.book-chapter{display:none}article{page-break-after:always}pre,blockquote{border:1px solid #999;page-break-inside:avoid;background:#f1f1f1;padding:8px}img{max-width:100%!important;page-break-inside:avoid;margin:0 auto}.exercise,.quiz{margin:1cm 0;padding:.4cm;page-break-inside:avoid;border:3px solid #ddd}.exercise .exercise-header,.quiz .exercise-header{margin-bottom:.4cm;padding-bottom:.2cm;border-bottom:1px solid #ddd}.exercise .question,.quiz .question{margin-top:.4cm} \ No newline at end of file
diff --git a/theme/stylesheets/ebook.less b/theme/stylesheets/ebook.less
index 520461c..0a9d655 100755
--- a/theme/stylesheets/ebook.less
+++ b/theme/stylesheets/ebook.less
@@ -24,7 +24,7 @@ img {
margin: 0px auto;
}
-.exercise {
+.exercise, .quiz {
margin: 1cm 0cm;
padding: 0.4cm;
page-break-inside: avoid;
@@ -36,4 +36,8 @@ img {
padding-bottom: 0.2cm;
border-bottom: 1px solid #ddd;
}
+
+ .question {
+ margin-top: 0.4cm;
+ }
}
diff --git a/theme/templates/page.html b/theme/templates/page.html
index ae06189..6c8cd54 100644
--- a/theme/templates/page.html
+++ b/theme/templates/page.html
@@ -20,9 +20,14 @@
</div>
{% elif section.type == "quiz" %}
<div class="quiz">
- <div class="exercise-header">Exercise #{{ exercise }}</div>
+ <div class="exercise-header">Quiz #{{ exercise }}</div>
{% autoescape false %}{{ section.content }}{% endautoescape %}
- {% autoescape false %}{{ section.quiz.base }}{% endautoescape %}
+ {% for quiz in section.quiz %}
+ <div class="question">
+ <div class="question-header">Question {{ loop.index }} of {{ section.quiz.length }}</div>
+ {% autoescape false %}{{ quiz.base }}{% endautoescape %}
+ </div>
+ {% endfor %}
{% set exercise = exercise + 1 %}
</div>
{% endif %}
@@ -60,9 +65,14 @@
</div>
{% elif section.type == "quiz" %}
<div class="quiz">
- <div class="exercise-header">Exercise #{{ exercise }}</div>
+ <div class="exercise-header">Quiz #{{ exercise }}</div>
{% autoescape false %}{{ section.content }}{% endautoescape %}
- {% autoescape false %}{{ section.quiz.solution }}{% endautoescape %}
+ {% for quiz in section.quiz %}
+ <div class="question">
+ <div class="question-header">Question {{ loop.index }} of {{ section.quiz.length }}</div>
+ {% autoescape false %}{{ quiz.solution }}{% endautoescape %}
+ </div>
+ {% endfor %}
{% set exercise = exercise + 1 %}
</div>
{% endif %}