feat: section template uses page_title and anchored section_title macros
This commit is contained in:
+17
-15
@@ -1,26 +1,28 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
{% import "macros/section_title.html" as st %}
|
||||||
|
{% import "macros/page_title.html" as pt %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<section class="single-page-title">
|
{{ pt::page_title(title=section.title) }}
|
||||||
<div class="container text-center hidden-xs">
|
|
||||||
<h2>{{ section.title }}</h2>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
|
{% if section.content %}
|
||||||
<section class="ptb-100">
|
<section class="ptb-100">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{% if section.content %}
|
<div class="row"><div class="col-md-12">{{ section.content | safe }}</div></div>
|
||||||
<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>
|
</div>
|
||||||
</section>
|
</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 %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user