mirror of
https://github.com/bigskysoftware/hypermedia-systems.git
synced 2025-11-28 00:04:56 -05:00
fix build failing
This commit is contained in:
parent
3e0c5a25f9
commit
ca6abef846
@ -47,26 +47,26 @@ layout: layout.njk
|
||||
</h1>
|
||||
</header>
|
||||
|
||||
{% if asciidoc.getSections().length %}
|
||||
{% macro toc(block, level=0, url="") %}
|
||||
{% set isPart = level == 0 and is_whole_book %}
|
||||
{% set isChapter = level == 1 and is_whole_book %}
|
||||
<ul class="nested-list">
|
||||
{% for sect in block.getSections() %}
|
||||
<li>
|
||||
<a href="{{ url }}#{{ sect.getId() }}" class="{{ 'bold' if isPart or isChapter }}">
|
||||
{{ 'Part ' + loop.index + ':' if isPart }}
|
||||
{{ sect.getTitle() | safe }}
|
||||
</a>
|
||||
{{ toc(sect, level + 1) if level < 2 and sect.getSections().length > 0 }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endmacro %}
|
||||
{% if asciidoc and asciidoc.getSections().length %}
|
||||
<div class="container">
|
||||
<details class="contents">
|
||||
<summary>Contents</summary>
|
||||
|
||||
{% macro toc(block, level=0, url="") %}
|
||||
{% set isPart = level == 0 and is_whole_book %}
|
||||
{% set isChapter = level == 1 and is_whole_book %}
|
||||
<ul class="nested-list">
|
||||
{% for sect in block.getSections() %}
|
||||
<li>
|
||||
<a href="{{ url }}#{{ sect.getId() }}" class="{{ 'bold' if isPart or isChapter }}">
|
||||
{{ 'Part ' + loop.index + ':' if isPart }}
|
||||
{{ sect.getTitle() | safe }}
|
||||
</a>
|
||||
{{ toc(sect, level + 1) if level < 2 and sect.getSections().length > 0 }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endmacro %}
|
||||
{{ asciidoc and toc(asciidoc, 0) }}
|
||||
</details>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user