From 0c1cb724d74e4ae07fbed7f0801eded0d3401c61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Sun, 12 Oct 2014 11:37:51 +0200 Subject: Handle correctly exercises in ebook --- theme/templates/includes/page/exercise.html | 6 ++++++ theme/templates/page.html | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 theme/templates/includes/page/exercise.html 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 @@ +
Exercise
+{% autoescape false %}{{ section.content }}{% endautoescape %} +
{% autoescape false %}{{ section.code.base|code }}{% endautoescape %}
+
+

Solution:

+
{% autoescape false %}{{ section.code.solution|code }}{% endautoescape %}
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 %} -- cgit v1.1