mirror of
https://github.com/welpo/tabi.git
synced 2025-10-11 07:46:15 +02:00
♻️ refactor: split macros.html in different files
Clearer macros format.
This commit is contained in:
parent
3d7a662ac8
commit
3aa22cb3ad
18 changed files with 233 additions and 256 deletions
38
templates/macros/list_posts.html
Normal file
38
templates/macros/list_posts.html
Normal file
|
@ -0,0 +1,38 @@
|
|||
{% macro list_posts(pages) %}
|
||||
<div class="bloglist-container">
|
||||
{% for page in pages %}
|
||||
<section class="bloglist-table-row">
|
||||
<div class="bloglist-title">
|
||||
<a href="{{ page.permalink }}">{{ page.title }}</a>
|
||||
</div>
|
||||
|
||||
<div class="card-meta">
|
||||
{% if page.date %}
|
||||
{{ macros_format_date::format_date(date=page.date) }}
|
||||
{% endif %}
|
||||
|
||||
<br/>
|
||||
<span>{{ page.reading_time }} min read</span>
|
||||
{% if page.draft %}
|
||||
<span class="draft-label">DRAFT</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div class="description">
|
||||
{% if page.description %}
|
||||
{{ page.description }}
|
||||
{% elif page.summary %}
|
||||
{{ page.summary | safe }}…
|
||||
{% else %}
|
||||
{% set hide_read_more = true %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if not hide_read_more %}
|
||||
<a class="readmore" href={{ page.permalink }}>Read more ⟶</a>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endmacro %}
|
Loading…
Add table
Add a link
Reference in a new issue