dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
site/templates/macros/posts.html (1617B)
1{% macro meta(page, list=false) %}
2<div class="post-meta {% if list %}meta-list{% else %}meta-page{% endif %}">
3 {{ posts::date(date=page.date, updated=page.updated) }} {% if page.date or
4 page.updated %} :: {% endif %} {% if list %}
5 <span class="post-metatitle">
6 <strong>@<a href="{{ page.permalink | safe }}">{{ page.title }}</a></strong>
7 </span>
8 {% else %}
9 <span class="post-readtime">
10 <span class="post-icon"></span> <i>{{ page.reading_time }}</i> min
11 </span>
12 ::
13 <span class="post-wordcount">
14 <span class="post-icon"></span> <i>{{ page.word_count }}</i> words
15 </span>
16 {% endif %} {{ posts::taxonomies(taxonomy=page.taxonomies) }}
17</div>
18{% endmacro meta %} {% macro date(date, updated) %}
19<span class="post-date">
20 {%- if updated -%}
21 <span class="post-icon"></span> {{ updated | date(format="%d.%m.%Y") }} {%-
22 if date -%} :: {%- endif -%} {%- endif -%} {%- if date -%}
23 <span class="post-icon"></span> {{ date | date(format="%d.%m.%Y") }} {%-
24 endif -%}
25</span>
26{% endmacro date %} {% macro taxonomies(taxonomy) %} {% if taxonomy.series -%}
27:: {{ posts::series(series=taxonomy.series) }} {% endif -%} {% if taxonomy.tags
28-%} :: {{ posts::tags(tags=taxonomy.tags) }} {% endif -%} {% endmacro taxonomies
29%} {% macro series(series) %} {% for serie in series -%}
30<strong
31 >^<a href="{{ get_taxonomy_url(kind='series', name=serie) }}"
32 >{{ serie }}</a
33 ></strong
34>
35{% endfor -%} {% endmacro series %} {% macro tags(tags) %} {% for tag in tags
36-%} #<a href="{{ get_taxonomy_url(kind='tags', name=tag) }}">{{ tag }}</a>
37{% endfor -%} {% endmacro tags %}