disable toc
This commit is contained in:
parent
0a2fd4fb86
commit
8eb64523d0
6 changed files with 99 additions and 105 deletions
|
|
@ -65,4 +65,24 @@
|
|||
|
||||
<!-- if i am <:checked/> -->
|
||||
</nav>
|
||||
{% endmacro render_header %}
|
||||
{% endmacro render_header %}
|
||||
|
||||
|
||||
{% macro render_toc(toc) %}
|
||||
<div class="toc">
|
||||
<div class="toc-sticky">
|
||||
{% for h in toc %}
|
||||
<div class="toc-item">
|
||||
<a class="subtext" href="{{h.permalink | safe}}">{{ h.title }}</a>
|
||||
</div>
|
||||
{% if h.children %}
|
||||
{% for h2 in h.children %}
|
||||
<div class="toc-item-child">
|
||||
<a class="subtext" href="{{h2.permalink | safe}}"><small>- {{ h2.title }}</small></a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro render_toc %}
|
||||
|
|
@ -94,32 +94,6 @@
|
|||
|
||||
|
||||
{% block toc %}
|
||||
{% if section.toc %}
|
||||
{% set toc = section.toc %}
|
||||
{% elif page.toc %}
|
||||
{% set toc = page.toc %}
|
||||
{% endif %}
|
||||
{% if toc %}
|
||||
{% if page.extra.disable_toc %}
|
||||
{% else %}
|
||||
<div class="toc">
|
||||
<div class="toc-sticky">
|
||||
{% for h in toc %}
|
||||
<div class="toc-item">
|
||||
<a class="subtext" href="{{h.permalink | safe}}">{{ h.title }}</a>
|
||||
</div>
|
||||
{% if h.children %}
|
||||
{% for h2 in h.children %}
|
||||
<div class="toc-item-child">
|
||||
<a class="subtext" href="{{h2.permalink | safe}}"><small>- {{ h2.title }}</small></a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock toc %}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,10 @@
|
|||
|
||||
{{ macros::render_header(path=path) }}
|
||||
</header>
|
||||
|
||||
{% endblock header %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<div class="margin-left:20vw; margin-right: 20vw;">
|
||||
<div class="heading-text">{{ section.title }}</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue