12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- {% extends "base.html" %}
- {% block title %}{{ section.title }}{% endblock title %}
- {% block header_logo %}
- <p class="header-title">{{ config.title }} | {{ section.title }}</p>
- {% endblock header_logo %}
- {% block content %}
- {{ section.content | safe }}
- <div>
- <h2>Parent</h2>
- <ul>
- <!-- List parent -->
- {% if section.ancestors | length > 0 %}
- {% set parent = section.ancestors | last %}
- {% set parent_path = parent | as_str %}
- {% set parent_section = get_section(path=parent_path) %}
- {% set my_section = parent_section %}
- <li>
- <a href="{{ parent_section.permalink }}">{{ parent_section.title }}</a>
- </li>
- {% else%}
- <li><a href=".">Back up</a></li>
- {% endif %}
- </ul>
- </div>
- <!-- List pages -->
- {% if my_section.pages %}
- <div>
- <h2>Pages</h2>
- <ul>
- {% set sorted_section_pages = my_section.pages | sort(attribute="title") %}
- {% for page in sorted_section_pages %}
- <li>
- <p>{% if page.date %}{{ page.date }} •{% endif %}
- <a href="{{ page.permalink }}">{{ page.title }}</a>
- </p>
- {% if page.description %}
- <p>{{ page.description }}</p>
- {% elif page.summary %}
- <p>{{ page.summary }}</p>
- {% else %}
- <p>{{ page.title }}....</p>
- {% endif %}
- </li>
- {% endfor %}
- </ul>
- </div>
- {% endif %}
- <!-- List subsections -->
- {% if my_section.subsections %}
- <div>
- <h2>Sections</h2>
- <ul>
- {% set sorted_section_subsections = my_section.subsections | sort() %}
- {% for section_subsection in sorted_section_subsections %}
- {% set subsection = get_section(path=section_subsection) %}
- <li>
- <a href="{{ subsection.permalink | safe }}">{{ subsection.title }}</a>
- </li>
- {% endfor %}
- </ul>
- </div>
- {% endif %}
- {% endblock content %}
|