buildsomething/templates/section.html
2024-11-14 10:03:43 +01:00

50 lines
1.4 KiB
HTML

{% import "_macros.html" as macros %}
{% extends "index.html" %}
{% block title %}{{ section.title }} | {{ super() }} {% endblock title %}
{% block header %}
<header class="box-shadow">
{% if lang =="en" %}
{% set path = [""] | concat(with=section.components) | join(sep="/") %}
{% else %}
{% set path = [""] | concat(with=section.components | slice(start=1)) | join(sep="/") %}
{% endif %}
{{ macros::render_header(path=path) }}
</header>
{% endblock header %}
{% block hero%}
{% endblock hero %}
{% block content %}
<div class="content text margin-left:20vw; margin-right: 20vw;">
<div class="heading-text">{{ section.title }}</div>
<ul class="blog">
{% for page in section.pages %}
<li class="blog card" hx-get="{{ page.permalink | safe }}" hx-push-url="true">
<div>
<a href="{{ page.permalink | safe }}">
<strong class="title article-title">{{ page.title }}</strong>
</a>
{% if page.date %}
<div>
<span>{{ page.date | date(format="%F") }}</span>
</div>
{% endif %}
</div>
{% if page.summary %}
<div itemprop="summary" class="content article-body">
{{ page.summary | safe }}
<nav class="readmore">
<a itemprop="url" href="{{ page.permalink | safe }}">Read More&nbsp;&raquo; </a>
</nav>
</div>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
{% endblock content %}