diff options
author | Samy Pessé <samypesse@gmail.com> | 2014-10-12 11:37:51 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2014-10-12 11:37:51 +0200 |
commit | 0c1cb724d74e4ae07fbed7f0801eded0d3401c61 (patch) | |
tree | 9d82775cbcd8516bc6a8afd5b99c120bb6f3db01 /theme | |
parent | 7cee2484266bba3ec64e494f996d0514b716ec83 (diff) | |
download | gitbook-0c1cb724d74e4ae07fbed7f0801eded0d3401c61.zip gitbook-0c1cb724d74e4ae07fbed7f0801eded0d3401c61.tar.gz gitbook-0c1cb724d74e4ae07fbed7f0801eded0d3401c61.tar.bz2 |
Handle correctly exercises in ebook
Diffstat (limited to 'theme')
-rw-r--r-- | theme/templates/includes/page/exercise.html | 6 | ||||
-rw-r--r-- | theme/templates/page.html | 2 |
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 %} |