anarsec.guide/themes/DeepThought/templates/macros.html
2024-04-22 18:54:36 +00:00

113 lines
3.2 KiB
HTML

{% macro social_links(social_config) %}
<p>
{% if social_config.github %}
<a href="https://github.com/{{ social_config.github }}" target="_blank">
<span class="icon is-large" title="GitHub">
<i class="fab fa-github fa-lg"></i>
</span>
</a>
{% endif %}
{% if social_config.gitlab %}
<a href="https://gitlab.com/{{ social_config.gitlab }}" target="_blank">
<span class="icon is-large" title="GitLab">
<i class="fab fa-gitlab fa-lg"></i>
</span>
</a>
{% endif %}
{% if social_config.keybase %}
<a href="https://keybase.io/{{ social_config.keybase }}" target="_blank">
<span class="icon is-large" title="Keybase">
<i class="fab fa-keybase fa-lg"></i>
</span>
</a>
{% endif %}
{% if social_config.mastodon %}
<a href="https://mastodon.social/{{ social_config.mastodon }}" target="_blank">
<span class="icon is-large" title="Mastodon">
<i class="fab fa-mastodon fa-lg"></i>
</span>
</a>
{% endif %}
{% if social_config.email %}
<a href="mailto:{{ social_config.email }}" target="_blank">
<span class="icon is-large" title="Email">
<i class="far fa-envelope fa-lg"></i>
</span>
</a>
{% endif %}
{% if config.generate_feed %}
<a href="{{ config.base_url }}/{{ config.feed_filename }}" target="_blank">
<span class="icon is-large" title="RSS Feed">
<i class="fas fa-rss fa-lg"></i>
</span>
</a>
{% endif %}
</p>
{% endmacro %}
{% macro page_publish_metadata(page) %}
<span class="icon-text published">
<span class="icon is-small">
<img src="/images/calendar-alt.png">
</span>
<span>Published on&nbsp;</span>
<span><time datetime="{{ page.date }}">{{ page.date | date(format='%B %d, %Y') }}</time></span>
<span>&nbsp;| <a href="https://0xacab.org/anarsec/anarsec.guide/-/blob/no-masters/CHANGELOG.md#{{page.title | slugify}}">Last edited on&nbsp;<time datetime="{{ page.extra.dateedit }}">{{ page.extra.dateedit | date(format='%B %d, %Y') }}</time></a></span>
</span>
{% endmacro %}
{% macro page_content_metadata(page) %}
<span class="icon-text has-text-grey">
<span class="icon is-small">
<img src="/images/clock.png">
</span>
<span>{{ page.reading_time }} min</span>
</span>
{% endmacro %}
{% macro page_content_pdfs(page) %}
<span class="icon-text">
<span class="icon is-small">
<img src="/images/file-pdf.png">
</span>
<span><a href="/posts/{{page.slug | lower}}/{{page.extra.letter | lower}}">Letter booklet</a> | <a href="/posts/{{page.slug | lower}}/{{page.extra.a4 | lower}}">A4 booklet</a> </span>
</span>
{% endmacro %}
{% macro render_categories(categories) %}
<p>
Categories:
{% for category in categories %}
<a class="has-text-weight-semibold" href="/categories/{{category | lower}}">
<span class="icon-text">
<span class="icon is-small">
<img src="/images/cube-pink.png">
</span>
<span>{{category}}</span>
</span>
</a>
{% endfor %}
</p>
{% endmacro %}
{% macro render_tags(tags) %}
<p>
Tags:
{% for tag in tags %}
<a class="has-text-weight-semibold" href="/tags/{{tag | lower}}">
<span class="icon-text">
<span class="icon is-small">
<img src="/images/tag-pink.png">
</span>
<span>{{tag}}</span>
</span>
</a>
{% endfor %}
</p>
{% endmacro %}