You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.3 KiB
HTML
45 lines
1.3 KiB
HTML
{% macro list_taxonomy(title, kind) %}
|
|
<span class="title">{{ title }}</span>
|
|
<ul>
|
|
{% set tags = get_taxonomy(kind=kind) %}
|
|
{% for term in tags.items %}
|
|
<li class="item"><a href="{{ term.permalink | safe }}">{{ term.name |capitalize }}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endmacro list_categories %}
|
|
|
|
{% macro page_info(page) %}
|
|
<div class="info">
|
|
<span class="date">{{ page.date }}</span>
|
|
{%- if page.extra.author -%}
|
|
, <span class="author">{{ page.extra.author }}</span>
|
|
{% endif %}
|
|
|
|
{% if page.taxonomies.tags %}
|
|
<div class="taxonomy">
|
|
<ul>
|
|
{% for tag in page.taxonomies.tags %}
|
|
<li><a href="{{ get_taxonomy_url(kind="categories", name=tag) | safe }}">#{{ tag }}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endmacro page_info %}
|
|
|
|
{% macro list_article(page) %}
|
|
<article>
|
|
<h1><a href="{{ page.permalink }}">{{ page.title }}</a></h1>
|
|
<p>{{ page.summary | safe }}</p>
|
|
{{ self::page_info(page=page) }}
|
|
</article>
|
|
{% endmacro list_articles %}
|
|
|
|
{% macro pagination(paginator) %}
|
|
<div class="pagination">
|
|
{% if paginator.previous %}<a href="{{ paginator.previous }}">«</a>{% endif %}
|
|
<span class="currentpage">{{ paginator.current_index }} / {{ paginator.number_pagers }}</span>
|
|
{% if paginator.next %}<a href="{{ paginator.next }}">»</a>{% endif %}
|
|
</div>
|
|
{% endmacro pagination %}
|