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.

35 lines
1.1 KiB
Twig

{% macro post_listing(post) %}
<div class="post-listing">
<h2 class="title"><a href="/post/{{ post.slug }}">{{ post.meta.title }}</a></h2>
{{ _self.meta(post) }}
<div class="description">{{ post.meta.description }}</div>
</div>
{% endmacro %}
{% macro meta(post) -%}
<div class="meta">
<span class="time">{{ post.meta.date.format("Y-m-d") }}</span>
<span class="tags">
{% for tag in post.meta.tags -%}
<a href="/tag/{{ tag|url_encode }}" class="tag">{{ tag }}</a>
{%- endfor %}
</span>
</div>
{%- endmacro %}
{% macro embed(game) %}
{% if game.meta.steam %}
{{ _self.steamwidget(game.meta.steam) }}
{% endif %}
{% if game.meta.itch %}
{{ _self.itchwidget(game.meta.itch) }}
{% endif %}
{% endmacro %}
{% macro steamwidget(steam_id) %}
<iframe rel="noreferrer noopener" src="https://store.steampowered.com/widget/{{ steam_id }}"></iframe>
{% endmacro %}
{% macro itchwidget(itch_id) %}
<iframe class="itch-widget" src="https://itch.io/embed/{{ itch_id }}?dark=true"></iframe>
{% endmacro %}