introducing templating inheritance and macros

This commit is contained in:
mtrx 2024-08-10 21:01:49 +02:00
parent 7fe997acff
commit 2e7a81d7c7
11 changed files with 206 additions and 230 deletions

View file

@ -0,0 +1,11 @@
{% macro article(id, title, body, publish_date) %}
<article>
<div class="post-content">
<a href="/id/{{ id }}" class="post-link">
<h2 class="post-title">{{ title }}</h2>
</a>
<sub class="post-publish-date"> {{ publish_date | date(format="%Y-%m-%d at %H:%M") }}</sub>
<p class="post-body">{{ body }}</p>
</div>
</article>
{% endmacro article %}