anarsec.guide/themes/DeepThought/templates/macros.html
2023-07-09 15:57:40 +00:00

113 lines
3.3 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 has-text-grey">
<span class="icon">
<i class="far fa-calendar-alt"></i>
</span>
<span>Published on&nbsp;</span>
<span><time datetime="{{ page.date }}">{{ page.date | date(format='%B %d, %Y') }}</time></span>
<span>&nbsp;| <a href="http://wmj5kiic7b6kjplpbvwadnht2nh2qnkbnqtcv3dyvpqtz7ssbssftxid.onion/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">
<i class="far fa-clock"></i>
</span>
<span>{{ page.reading_time }} min</span>
</span>
{% endmacro %}
{% macro page_content_pdfs(page) %}
<span class="icon-text has-text-grey">
<span class="icon">
<i class="far fa-file-pdf"></i>
</span>
<span>PDF: <a href="/posts/{{page.slug | lower}}/{{page.extra.letter | lower}}">Letter</a> | <a href="/posts/{{page.slug | lower}}/{{page.extra.a4 | lower}}">A4</a> </span>
</span>
{% endmacro %}
{% macro render_categories(categories) %}
<p>
Categories:
{% for category in categories %}
<a class="has-text-info-dark has-text-weight-semibold" href="/categories/{{category | lower}}">
<span class="icon-text">
<span class="icon">
<i class="fas fa-cube"></i>
</span>
<span>{{category}}</span>
</span>
</a>
{% endfor %}
</p>
{% endmacro %}
{% macro render_tags(tags) %}
<p>
Tags:
{% for tag in tags %}
<a class="has-text-info-dark has-text-weight-semibold" href="/tags/{{tag | lower}}">
<span class="icon-text">
<span class="icon">
<i class="fas fa-tag"></i>
</span>
<span>{{tag}}</span>
</span>
</a>
{% endfor %}
</p>
{% endmacro %}