From b462d1607e03851681596a9e9858a61f0c414cb6 Mon Sep 17 00:00:00 2001 From: Lise Henry Date: Wed, 9 Aug 2023 20:13:21 +0200 Subject: [PATCH] Update html_single templates --- templates/html_single/script.js | 18 +++++++++--------- templates/html_single/template.html | 22 +++++++++++----------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/templates/html_single/script.js b/templates/html_single/script.js index 6f598a3..46afd62 100644 --- a/templates/html_single/script.js +++ b/templates/html_single/script.js @@ -1,6 +1,6 @@ -{{{common_script}}} +{{common_script}} -{{#one_chapter}} +{% if one_chapter %} function showChapter(chap, noreset){ if (!displayAll) { var chapters = document.getElementsByClassName("chapter"); @@ -62,16 +62,16 @@ function switchAll() { toc.style.display = "block"; } displayAllSwitcher = document.getElementById("book-button"); - displayAllSwitcher.src="{{{pages_svg}}}"; - displayAllSwitcher.alt="{{{loc_display_one}}}"; - displayAllSwitcher.title="{{{loc_display_one}}}"; + displayAllSwitcher.src="{{pages_svg}}"; + displayAllSwitcher.alt="{{loc_display_one}}"; + displayAllSwitcher.title="{{loc_display_one}}"; } else { displayAll = false; showChapter(0); displayAllSwitcher = document.getElementById("book-button"); - displayAllSwitcher.src="{{{book_svg}}}"; - displayAllSwitcher.alt="{{{loc_display_all}}}"; - displayAllSwitcher.title="{{{loc_display_all}}}"; + displayAllSwitcher.src="{{book_svg}}"; + displayAllSwitcher.alt="{{loc_display_all}}"; + displayAllSwitcher.title="{{loc_display_all}}"; } } @@ -99,4 +99,4 @@ window.onload = function(){ }; -{{/one_chapter}} +{% endif %} diff --git a/templates/html_single/template.html b/templates/html_single/template.html index da12f83..068fa15 100644 --- a/templates/html_single/template.html +++ b/templates/html_single/template.html @@ -13,7 +13,7 @@ - {{#highlight_code}} + {% if highlight_code %} @@ -21,7 +21,7 @@ - {{/highlight_code}} + {% endif %}} @@ -30,9 +30,9 @@ {{json_data}} - {{#has_toc}} + {% if has_toc %} - {{/has_toc}} + {% endif %}
{{header}} @@ -55,20 +55,20 @@

{{author}}

{{title}}

- {{#has_subtitle}}

{{subtitle}}

{{/has_subtitle}} - {{#has_autograph}} + {% if has_subtitle %}

{{subtitle}}

{% endif %} + {% if has_autograph %}
{{autograph}}
- {{/has_autograph}} + {% endif %}
{{content}}