index.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {% extends "base.html" %}
  2. {% block title %}{{ section.title }}{% endblock title %}
  3. {% block header_logo %}
  4. <p class="header-title">{{ config.extra.blog_title }} | {{ section.title }}</p>
  5. {% endblock header_logo %}
  6. {% block content %}
  7. {{ section.content | safe }}
  8. <div>
  9. <h2>Contents</h2>
  10. <ul>
  11. <!-- List parent -->
  12. {% if section.ancestors | length > 0 %}
  13. {% set parent = section.ancestors | last %}
  14. {% set parent_path = parent | as_str %}
  15. {% set parent_section = get_section(path=parent_path) %}
  16. <li>
  17. <a href="{{ parent_section.permalink }}">Back up</a>
  18. </li>
  19. {% else%}
  20. <li><a href=".">Back up</a></li>
  21. {% endif %}
  22. <!-- List pages -->
  23. {% for page in section.pages %}
  24. <li>
  25. <p>{% if page.date %}{{ page.date }} &bullet;{% endif %}
  26. <a href="{{ page.permalink }}">{{ page.title }}</a>
  27. </p>
  28. {% if page.description %}
  29. <p>{{ page.description }}</p>
  30. {% elif page.summary %}
  31. <p>{{ page.summary }}</p>
  32. {% else %}
  33. <p>{{ page.title }}....</p>
  34. {% endif %}
  35. </li>
  36. {% endfor %}
  37. <!-- List subsections -->
  38. {% set sorted_section_subsections = section.subsections | sort() %}
  39. {% for section_subsection in sorted_section_subsections %}
  40. {% set subsection = get_section(path=section_subsection) %}
  41. <li>
  42. <a href="{{ subsection.permalink | safe }}">{{ subsection.title }}</a>
  43. </li>
  44. {% endfor %}
  45. </ul>
  46. </div>
  47. {% endblock content %}