docs/templates/section.html

36 lines
1.0 KiB
HTML

{% extends "index.html" %}
{% block title %} {{ config.title }} | {{ section.title }} {% endblock title %}
{% block content %}
{% if section.word_count > 0 -%}
{{ section.content | safe }}
{% else -%}
<h2 class="title"> {{ section.title }} </h2>
{% if section.subsections -%}
<h3>Subsections:</h3>
<ul>
{% for subsec in section.subsections -%}
{% set sec_ = get_section(path=subsec) -%}
<li><a href="{{ sec_.permalink | safe }}{{ _ugly_url }}">{{ sec_.title }}</a></li>
{% endfor %}
</ul>
{% endif -%}
<h3>Pages:</h3>
<ul>
{% if section.pages -%}
{% for page in section.pages -%}
<li><a href="{{ page.permalink | safe }}{{ _ugly_url }}">{{ page.title }}</a></li>
{% endfor -%}
{% else -%}
<li>No pages</li>
{% endif %}
</ul>
{% endif -%}
{% endblock content %}