1
0
Fork 0
mirror of https://github.com/lise-henry/crowbook synced 2024-05-13 19:56:03 +02:00

Update html_single templates

This commit is contained in:
Lise Henry 2023-08-09 20:13:21 +02:00
parent a7747800d5
commit b462d1607e
2 changed files with 20 additions and 20 deletions

View File

@ -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 %}

View File

@ -13,7 +13,7 @@
<style type = "text/css" media = "print">
{{print_style}}
</style>
{{#highlight_code}}
{% if highlight_code %}
<style>
{{highlight_css}}
</style>
@ -21,7 +21,7 @@
<script>
hljs.initHighlightingOnLoad();
</script>
{{/highlight_code}}
{% endif %}}
<script>
{{script}}
</script>
@ -30,9 +30,9 @@
</head>
<body>
{{json_data}}
{{#has_toc}}
{% if has_toc %}
<nav id = "nav">
{{#one_chapter}}
{% if one_chapter %}
<div id = "nav-container">
<div id="toolbar">
<img id="book-button" alt="Display mode"
@ -41,13 +41,13 @@
onclick="javascript:switchAll()">
</div>
</div>
{{/one_chapter}}
{% endif %}
<div id = "nav-title">
<h2><a href = "#link-0">{{title}}</a></h2>
</div>
{{toc}}
</nav>
{{/has_toc}}
{% endif %}
<div id = "content">
{{header}}
@ -55,20 +55,20 @@
<header>
<div id = "menu">
{{#has_toc}}
{% if has_toc %}
<img id = "menu-button" onclick="toggle();"
src="{{menu_svg}}"
alt = "{{loc_toc}}" title = "{{loc_toc}}" />
{{/has_toc}}
{% endif %}
</div>
<h2 class="author">{{author}}</h2>
<h1 id = "link-0" class="title" >{{title}}</h1>
{{#has_subtitle}}<h2 class = "subtitle">{{subtitle}}</h2>{{/has_subtitle}}
{{#has_autograph}}
{% if has_subtitle %}<h2 class = "subtitle">{{subtitle}}</h2>{% endif %}
{% if has_autograph %}
<div id = "autograph">
{{autograph}}
</div>
{{/has_autograph}}
{% endif %}
</header>
{{content}}