1
0
Fork 0
mirror of https://github.com/lise-henry/crowbook synced 2024-05-26 12:06:12 +02:00

Fix template for html single

This commit is contained in:
Lise Henry 2023-08-09 13:48:37 +02:00
parent 0fb81d8740
commit ee8f84d13b
4 changed files with 42 additions and 42 deletions

View File

@ -41,16 +41,16 @@ rendering.highlight:str:syntect # {renderin
rendering.highlight.theme:str:InspiredGitHub # {rendering_highlight_theme} rendering.highlight.theme:str:InspiredGitHub # {rendering_highlight_theme}
rendering.initials:bool:false # {rendering_initials} rendering.initials:bool:false # {rendering_initials}
rendering.inline_toc:bool:false # {inline_toc} rendering.inline_toc:bool:false # {inline_toc}
rendering.inline_toc.name:str:\"{{{{{{loc_toc}}}}}}\" # {toc_name} rendering.inline_toc.name:str:\"{{{{loc_toc}}}}\" # {toc_name}
rendering.num_depth:int:1 # {num_depth} rendering.num_depth:int:1 # {num_depth}
rendering.chapter:str # {chapter} rendering.chapter:str # {chapter}
rendering.part:str # {part} rendering.part:str # {part}
rendering.chapter.roman_numerals:bool:false # {roman_numerals_chapters} rendering.chapter.roman_numerals:bool:false # {roman_numerals_chapters}
rendering.part.roman_numerals:bool:true # {roman_numerals_parts} rendering.part.roman_numerals:bool:true # {roman_numerals_parts}
rendering.part.reset_counter:bool:true # {reset_counter} rendering.part.reset_counter:bool:true # {reset_counter}
rendering.chapter.template:str:\"{{{{{{number}}}}}}. {{{{{{chapter_title}}}}}}\" # {chapter_template} rendering.chapter.template:str:\"{{{{number}}}}. {{{{chapter_title}}}}\" # {chapter_template}
rendering.part.template:str:\"{{{{{{number}}}}}}. {{{{{{part_title}}}}}}\" # {part_template} rendering.part.template:str:\"{{{{number}}}}. {{{{part_title}}}}\" # {part_template}
@ -72,8 +72,8 @@ html.highlight.js:tpl # {highlight_js}
html.highlight.css:tpl # {highlight_css} html.highlight.css:tpl # {highlight_css}
html.side_notes:bool:false # {side_notes} html.side_notes:bool:false # {side_notes}
html.escape_nb_spaces:bool:true # {nb_spaces} html.escape_nb_spaces:bool:true # {nb_spaces}
html.chapter.template:str:\"<h1 id = 'link-{{{{{{link}}}}}}'>{{{{#has_number}}}}<span class = 'chapter-header'>{{{{{{header}}}}}} {{{{{{number}}}}}}</span>{{{{#has_title}}}}<br />{{{{/has_title}}}}{{{{/has_number}}}}{{{{{{title}}}}}}</h1>\" # {html_chapter_template} html.chapter.template:str:\"<h1 id = 'link-{{{{link}}}}'>{{% if has_number %}}<span class = 'chapter-header'>{{{{header}}}} {{{{number}}}}</span>{{% if has_title %}}<br />{{% endif %}}{{% endif %}}{{{{title}}}}</h1>\" # {html_chapter_template}
html.part.template:str:\"<h2 class = 'part'>{{{{{{header}}}}}} {{{{{{number}}}}}}</h2> <h1 id = 'link-{{{{{{link}}}}}}' class = 'part'>{{{{{{title}}}}}}</h1>\" # {html_part_template} html.part.template:str:\"<h2 class = 'part'>{{{{header}}}} {{{{number}}}}</h2> <h1 id = 'link-{{{{link}}}}' class = 'part'>{{{{title}}}}</h1>\" # {html_part_template}
# {html_single_opt} # {html_single_opt}
html.standalone.template:tpl # {single_html} html.standalone.template:tpl # {single_html}

View File

@ -1,6 +1,6 @@
/* Default HTML CSS file includes default EPUB CSS file */ /* Default HTML CSS file includes default EPUB CSS file */
{{{colors}}} {{colors}}
p.first-para:first-letter { p.first-para:first-letter {
font-size: 300%; font-size: 300%;
@ -199,4 +199,4 @@ footer p, #top p {
max-width: 33em; max-width: 33em;
} }
{{{additional_code}}} {{additional_code}}

View File

@ -1,11 +1,11 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{{lang}}}"> <html lang="{{lang}}">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="generator" content="crowbook"> <meta name="generator" content="crowbook">
<meta name="author" content="{{{author_raw}}}"> <meta name="author" content="{{author_raw}}">
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
{{{favicon}}} {{favicon}}
<title>{{title_raw}} - {{chapter_title_raw}}</title> <title>{{title_raw}} - {{chapter_title_raw}}</title>
<link rel = "stylesheet" href = "stylesheet.css" type = "text/css" <link rel = "stylesheet" href = "stylesheet.css" type = "text/css"
/> />
@ -20,32 +20,32 @@
</script> </script>
{{/highlight_code}} {{/highlight_code}}
<script> <script>
{{{script}}} {{script}}
</script> </script>
</head> </head>
<body> <body>
{{{json_data}}} {{json_data}}
<nav id = "nav"> <nav id = "nav">
<h2><a href = "index.html">{{{title}}}</a></h2> <h2><a href = "index.html">{{title}}</a></h2>
{{{toc}}} {{toc}}
</nav> </nav>
<div id = "content"> <div id = "content">
{{{header}}} {{header}}
<div id = "page"> <div id = "page">
<header> <header>
<div id = "menu"> <div id = "menu">
<img id = "menu-button" onclick="toggle();" <img id = "menu-button" onclick="toggle();"
src="menu.svg" alt = "{{{loc_toc}}}" title = "{{{loc_toc}}}" /> src="menu.svg" alt = "{{loc_toc}}" title = "{{loc_toc}}" />
</div> </div>
</header> </header>
{{{prev_chapter}}} {{prev_chapter}}
{{{content}}} {{content}}
{{{next_chapter}}} {{next_chapter}}
</div> </div>
{{{footer}}} {{footer}}
</div> </div>
</body> </body>
</html> </html>

View File

@ -1,80 +1,80 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{{lang}}}"> <html lang="{{lang}}">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="generator" content="crowbook"> <meta name="generator" content="crowbook">
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
<meta name="author" content="{{{author_raw}}}"> <meta name="author" content="{{author_raw}}">
{{{favicon}}} {{favicon}}
<title>{{title_raw}}</title> <title>{{title_raw}}</title>
<style type = "text/css"> <style type = "text/css">
{{{style}}} {{style}}
</style> </style>
<style type = "text/css" media = "print"> <style type = "text/css" media = "print">
{{{print_style}}} {{print_style}}
</style> </style>
{{#highlight_code}} {{#highlight_code}}
<style> <style>
{{{highlight_css}}} {{highlight_css}}
</style> </style>
<script src = "{{{highlight_js}}}"></script> <script src = "{{highlight_js}}"></script>
<script> <script>
hljs.initHighlightingOnLoad(); hljs.initHighlightingOnLoad();
</script> </script>
{{/highlight_code}} {{/highlight_code}}
<script> <script>
{{{script}}} {{script}}
</script> </script>
</head> </head>
<body> <body>
{{{json_data}}} {{json_data}}
{{#has_toc}} {{#has_toc}}
<nav id = "nav"> <nav id = "nav">
{{#one_chapter}} {{#one_chapter}}
<div id = "nav-container"> <div id = "nav-container">
<div id="toolbar"> <div id="toolbar">
<img id="book-button" alt="Display mode" <img id="book-button" alt="Display mode"
title = "{{{loc_display_all}}}" title = "{{loc_display_all}}"
src="{{{book_svg}}}" src="{{book_svg}}"
onclick="javascript:switchAll()"> onclick="javascript:switchAll()">
</div> </div>
</div> </div>
{{/one_chapter}} {{/one_chapter}}
<div id = "nav-title"> <div id = "nav-title">
<h2><a href = "#link-0">{{{title}}}</a></h2> <h2><a href = "#link-0">{{title}}</a></h2>
</div> </div>
{{{toc}}} {{toc}}
</nav> </nav>
{{/has_toc}} {{/has_toc}}
<div id = "content"> <div id = "content">
{{{header}}} {{header}}
<div id = "page"> <div id = "page">
<header> <header>
<div id = "menu"> <div id = "menu">
{{#has_toc}} {{#has_toc}}
<img id = "menu-button" onclick="toggle();" <img id = "menu-button" onclick="toggle();"
src="{{{menu_svg}}}" src="{{menu_svg}}"
alt = "{{{loc_toc}}}" title = "{{{loc_toc}}}" /> alt = "{{loc_toc}}" title = "{{loc_toc}}" />
{{/has_toc}} {{/has_toc}}
</div> </div>
<h2 class="author">{{{author}}}</h2> <h2 class="author">{{author}}</h2>
<h1 id = "link-0" class="title" >{{{title}}}</h1> <h1 id = "link-0" class="title" >{{title}}</h1>
{{#has_subtitle}}<h2 class = "subtitle">{{{subtitle}}}</h2>{{/has_subtitle}} {{#has_subtitle}}<h2 class = "subtitle">{{subtitle}}</h2>{{/has_subtitle}}
{{#has_autograph}} {{#has_autograph}}
<div id = "autograph"> <div id = "autograph">
{{{autograph}}} {{autograph}}
</div> </div>
{{/has_autograph}} {{/has_autograph}}
</header> </header>
{{{content}}} {{content}}
</div> </div>
{{{footer}}} {{footer}}
</div> </div>
</body> </body>
</html> </html>