mirror of
https://github.com/hendricius/the-sourdough-framework
synced 2025-11-23 03:21:12 -06:00
Add list of flowcharts in ebook (#240)
* Add list of flowcharts in ebook * Mark menu as selected on list of flowcharts --------- Co-authored-by: Hendrik Kleinwaechter <hendrik.kleinwaechter@gmail.com>
This commit is contained in:
@@ -1,4 +1,9 @@
|
|||||||
\Preamble{xhtml}
|
\Preamble{xhtml}
|
||||||
|
\renewcommand\listofflowcharts{%
|
||||||
|
\chapter*{\listoflocname}%
|
||||||
|
\TableOfContents[loc]%
|
||||||
|
}
|
||||||
|
\ConfigureToc{loc}{\HCode{<span class="lofToc">}}{\ }{}{\HCode{</span><br />}}
|
||||||
\begin{document}
|
\begin{document}
|
||||||
\Configure{DocumentLanguage}{en}
|
\Configure{DocumentLanguage}{en}
|
||||||
\Configure{OpfScheme}{URI}
|
\Configure{OpfScheme}{URI}
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ class ModifyBuild
|
|||||||
# https://github.com/hendricius/the-sourdough-framework/pull/188 for more
|
# https://github.com/hendricius/the-sourdough-framework/pull/188 for more
|
||||||
# details
|
# details
|
||||||
appendix_html = %Q{
|
appendix_html = %Q{
|
||||||
<span class="chapterToc">
|
<span class="chapterToc flowcharts-menu">
|
||||||
<a href="listoflocname.html">
|
<a href="listoflocname.html">
|
||||||
<span class="link_text">List of Flowcharts</span>
|
<span class="link_text">List of Flowcharts</span>
|
||||||
</a>
|
</a>
|
||||||
@@ -379,6 +379,14 @@ class ModifyBuild
|
|||||||
doc.css(".menu-items .chapterToc.home-link")[0].add_class("selected")
|
doc.css(".menu-items .chapterToc.home-link")[0].add_class("selected")
|
||||||
return doc.to_html
|
return doc.to_html
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Special case for the flowcharts page which is added by us to the menu.
|
||||||
|
# This needs to be done for future manually added pages too
|
||||||
|
if "listoflocname.html" == filename
|
||||||
|
doc.css(".menu-items .chapterToc.flowcharts-menu")[0].add_class("selected")
|
||||||
|
return doc.to_html
|
||||||
|
end
|
||||||
|
|
||||||
return doc.to_html unless selected
|
return doc.to_html unless selected
|
||||||
|
|
||||||
# Fix that when the menu is selected the href is empty. This way users can
|
# Fix that when the menu is selected the href is empty. This way users can
|
||||||
|
|||||||
Reference in New Issue
Block a user