diff --git a/templates/section.html b/templates/section.html index 7c161f0..d7ed85c 100644 --- a/templates/section.html +++ b/templates/section.html @@ -1,26 +1,28 @@ {% extends "base.html" %} +{% import "macros/section_title.html" as st %} +{% import "macros/page_title.html" as pt %} {% block content %} - - - {{ section.title }} - - +{{ pt::page_title(title=section.title) }} +{% if section.content %} - {% if section.content %} - {{ section.content | safe }} - {% endif %} - - {% for page in section.pages %} - - {{ page.title }} - {{ page.content | safe }} - - {% endfor %} + {{ section.content | safe }} +{% endif %} + +{% for page in section.pages %} + + {{ st::section_title(title=page.title, anchor=page.extra.anchor | default(value=page.slug)) }} + + + {{ page.content | safe }} + + + +{% endfor %} {% endblock %}