mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-03-29 04:23:34 +01:00
32 lines
708 B
HTML
32 lines
708 B
HTML
{% macro render_headings(headings) %}
|
|
<ul>
|
|
{% for item in headings %}
|
|
<li>
|
|
<a href="{{ pathto(item.link).replace("#", "") + '#' + item.anchor }}">{{ item.text }}</a>
|
|
{% if item.children %}
|
|
{{ render_headings(item.children) }}
|
|
{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endmacro %}
|
|
|
|
{% if local_md_headings %}
|
|
<div class="local-md-headings">
|
|
<h3>Current Folder</h3>
|
|
{{ render_headings(local_md_headings) }}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if local_subfolders %}
|
|
<div class="local-subfolders">
|
|
<h3>Subfolders</h3>
|
|
<ul>
|
|
{% for item in local_subfolders %}
|
|
<li><a href="{{ pathto(item.link) }}">{{ item.text }}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
|