BLOG/templates/macros/macros.html

28 lines
751 B
HTML
Raw Normal View History

2023-05-02 12:54:49 +08:00
{% macro list_title(pages, tag_name=false) %}
<ul class="posts">
{% for page in pages %}
<li class="post">
<a href="{{ page.permalink }}">{{ page.title }}</a>
<span class="meta">{{ page.date | date(format="%Y-%m-%d") }}</span>
</li>
{% endfor %}
</ul>
{% endmacro list_title %}
{% macro content(page, extra) %}
<main>
<article>
<div class="title">
<h1 class="title">{{ page.title }}</h1>
<div class="meta">
{{ page.date | date(format="%Y-%m-%d") }}
</div>
</div>
<section class="body">
{{ page.content | safe }}
</section>
</article>
</main>
{% endmacro content %}