introducing templating inheritance and macros
This commit is contained in:
parent
7fe997acff
commit
2e7a81d7c7
11 changed files with 206 additions and 230 deletions
11
site/content/templates/article.html.macro
Normal file
11
site/content/templates/article.html.macro
Normal 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 %}
|
Loading…
Add table
Add a link
Reference in a new issue