feat: section template uses page_title and anchored section_title macros
This commit is contained in:
+16
-14
@@ -1,26 +1,28 @@
|
||||
{% extends "base.html" %}
|
||||
{% import "macros/section_title.html" as st %}
|
||||
{% import "macros/page_title.html" as pt %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<section class="single-page-title">
|
||||
<div class="container text-center hidden-xs">
|
||||
<h2>{{ section.title }}</h2>
|
||||
</div>
|
||||
</section>
|
||||
{{ pt::page_title(title=section.title) }}
|
||||
|
||||
{% if section.content %}
|
||||
<section class="ptb-100">
|
||||
<div class="container">
|
||||
{% if section.content %}
|
||||
<div class="row"><div class="col-md-12">{{ section.content | safe }}</div></div>
|
||||
{% endif %}
|
||||
|
||||
{% for page in section.pages %}
|
||||
<article id="{{ page.extra.anchor | default(value=page.slug) }}" class="anchor-section">
|
||||
<h2 class="section-title">{{ page.title }}</h2>
|
||||
{{ page.content | safe }}
|
||||
</article>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
{% for page in section.pages %}
|
||||
<section class="text ptb-text">
|
||||
{{ st::section_title(title=page.title, anchor=page.extra.anchor | default(value=page.slug)) }}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
{{ page.content | safe }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endfor %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user