summaryrefslogtreecommitdiffstats
path: root/theme
diff options
context:
space:
mode:
Diffstat (limited to 'theme')
-rw-r--r--theme/templates/includes/page/exercise.html6
-rw-r--r--theme/templates/page.html2
2 files changed, 7 insertions, 1 deletions
diff --git a/theme/templates/includes/page/exercise.html b/theme/templates/includes/page/exercise.html
new file mode 100644
index 0000000..da47cc0
--- /dev/null
+++ b/theme/templates/includes/page/exercise.html
@@ -0,0 +1,6 @@
+<div class="exercise-header">Exercise</div>
+{% autoescape false %}{{ section.content }}{% endautoescape %}
+<pre><code>{% autoescape false %}{{ section.code.base|code }}{% endautoescape %}</code></pre>
+<hr>
+<p>Solution:</p>
+<pre><code>{% autoescape false %}{{ section.code.solution|code }}{% endautoescape %}</code></pre>
diff --git a/theme/templates/page.html b/theme/templates/page.html
index 2f74fcf..1bec167 100644
--- a/theme/templates/page.html
+++ b/theme/templates/page.html
@@ -20,7 +20,7 @@
{% if section.type == "normal" %}
{% autoescape false %}{{ section.content }}{% endautoescape %}
{% elif section.type == "exercise" %}
- {% include "./includes/book/exercise.html" with {section: section} %}
+ {% include "./includes/page/exercise.html" with {section: section} %}
{% elif section.type == "quiz" %}
{% include "./includes/book/quiz.html" with {section: section} %}
{% endif %}