website/site/content/_imports/blog.html

17 lines
No EOL
734 B
HTML

{# :t posts = list[typedef.AbbreviatedPost]
:t highlightFavourites = bool #}
{% macro postList(posts, highlightFavourites=True) -%}
<ul>
{% for post in posts %}
{% set showFavourite = post.isFavourite and highlightFavourites %}
<li>
<span class="font--tnum text--secondary">{{ post.publishedDate | fmtdate }}</span> {% if showFavourite %}<b class="favourite">{% endif %}<a href="/blog/{{ post.slug }}">{{ post.title }}</a>{% if showFavourite %}</b>{% endif %}
</li>
{% endfor %}
</ul>
{%- endmacro %}
{% macro feedHeaders() -%}
<link rel="alternate" type="application/atom+xml" href="/blog/feed.atom">
<link rel="alternate" type="application/json" href="/blog/feed.json">
{% endmacro %}