blube.club/templates/macros.html

150 lines
4.1 KiB
HTML
Raw Normal View History

2020-09-01 14:57:42 +00:00
{% macro social_links(social_config) %}
2021-06-08 20:36:13 +00:00
<p>
2021-02-22 03:18:17 +00:00
{% if social_config.facebook %}
<a href="https://facebook.com/{{ social_config.facebook }}" target="_blank">
<span class="icon is-large" title="Facebook">
2021-02-19 19:37:51 +00:00
<i class="fab fa-facebook fa-lg"></i>
2021-02-22 03:18:17 +00:00
</span>
</a>
{% endif %}
{% if social_config.twitter %}
<a href="https://twitter.com/{{ social_config.twitter }}" target="_blank">
<span class="icon is-large" title="Twitter">
2021-02-19 19:37:51 +00:00
<i class="fab fa-twitter fa-lg"></i>
2021-02-22 03:18:17 +00:00
</span>
</a>
{% endif %}
{% if social_config.linkedin %}
<a href="https://www.linkedin.com/in/{{ social_config.linkedin }}" target="_blank">
<span class="icon is-large" title="LinkedIn">
2021-02-19 19:37:51 +00:00
<i class="fab fa-linkedin fa-lg"></i>
2021-02-22 03:18:17 +00:00
</span>
</a>
{% endif %}
{% if social_config.github %}
<a href="https://github.com/{{ social_config.github }}" target="_blank">
<span class="icon is-large" title="GitHub">
2021-02-19 19:37:51 +00:00
<i class="fab fa-github fa-lg"></i>
2021-02-22 03:18:17 +00:00
</span>
</a>
{% endif %}
{% if social_config.gitlab %}
<a href="https://gitlab.com/{{ social_config.gitlab }}" target="_blank">
<span class="icon is-large" title="GitLab">
2021-02-19 19:37:51 +00:00
<i class="fab fa-gitlab fa-lg"></i>
2021-02-22 03:18:17 +00:00
</span>
</a>
{% endif %}
{% if social_config.stackoverflow %}
<a href="https://stackoverflow.com/users/{{ social_config.stackoverflow }}" target="_blank">
<span class="icon is-large" title="Stack Overflow">
2021-02-19 19:37:51 +00:00
<i class="fab fa-stack-overflow fa-lg"></i>
2021-02-22 03:18:17 +00:00
</span>
</a>
{% endif %}
{% if social_config.keybase %}
<a href="https://keybase.io/{{ social_config.keybase }}" target="_blank">
<span class="icon is-large" title="Keybase">
2021-02-19 19:37:51 +00:00
<i class="fab fa-keybase fa-lg"></i>
2021-02-22 03:18:17 +00:00
</span>
</a>
{% endif %}
2021-07-09 16:09:15 +00:00
{% if social_config.instagram %}
2021-07-09 16:11:19 +00:00
<a href="https://www.instagram.com/{{ social_config.instagram}}" target="_blank">
<span class="icon is-large" title="Instagram">
2021-07-09 16:09:15 +00:00
<i class="fab fa-instagram fa-lg"></i>
</span>
</a>
{% endif %}
2021-07-09 15:52:17 +00:00
{% if social_config.behance %}
<a href="https://www.behance.net/{{ social_config.behance }}" target="_blank">
<span class="icon is-large" title="Behance">
2021-07-09 15:52:17 +00:00
<i class="fab fa-behance fa-lg"></i>
</span>
</a>
{% endif %}
2021-02-22 03:18:17 +00:00
{% if social_config.email %}
<a href="mailto:{{ social_config.email }}" target="_blank">
<span class="icon is-large" title="Email">
2021-02-19 19:37:51 +00:00
<i class="far fa-envelope fa-lg"></i>
2021-02-22 03:18:17 +00:00
</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">
2021-02-19 19:37:51 +00:00
<i class="fas fa-rss fa-lg"></i>
2021-02-22 03:18:17 +00:00
</span>
</a>
{% endif %}
2021-06-08 20:36:13 +00:00
</p>
2020-09-01 14:57:42 +00:00
{% endmacro %}
2021-02-19 19:37:51 +00:00
{% macro page_publish_metadata(page) %}
2021-02-22 03:18:17 +00:00
<span class="icon-text has-text-grey">
<span class="icon">
<i class="fas fa-user"></i>
2021-02-19 19:37:51 +00:00
</span>
2021-02-22 03:18:17 +00:00
<span>{{ config.extra.author.name }} published on</span>
<span class="icon">
<i class="far fa-calendar-alt"></i>
</span>
<span><time datetime="{{ page.date }}">{{ page.date | date(format='%B %d, %Y') }}</time></span>
</span>
2020-09-01 14:57:42 +00:00
{% endmacro %}
2021-02-19 19:37:51 +00:00
2020-09-01 14:57:42 +00:00
{% macro page_content_metadata(page) %}
2021-02-22 03:18:17 +00:00
<span class="icon-text has-text-grey">
<span class="icon">
<i class="far fa-clock"></i>
2021-02-19 19:37:51 +00:00
</span>
2021-02-22 03:18:17 +00:00
<span>{{ page.reading_time }} min,</span>
<span class="icon">
<i class="fas fa-pencil-alt"></i>
</span>
<span>{{ page.word_count }} words</span>
</span>
2020-09-01 14:57:42 +00:00
{% endmacro %}
2021-02-19 19:37:51 +00:00
2020-09-01 14:57:42 +00:00
{% macro render_categories(categories) %}
2021-02-22 03:18:17 +00:00
<p>
2021-02-19 19:37:51 +00:00
Categories:
{% for category in categories %}
2021-06-10 15:43:30 +00:00
<a class="has-text-info-dark has-text-weight-semibold" href="{{ get_taxonomy_url(kind='categories', name=category) }}">
2021-02-22 03:18:17 +00:00
<span class="icon-text">
<span class="icon">
2021-03-19 18:49:57 +00:00
<i class="fas fa-cube"></i>
2021-02-22 03:18:17 +00:00
</span>
<span>{{category}}</span>
2021-02-19 19:37:51 +00:00
</span>
</a>
{% endfor %}
</p>
2020-09-01 14:57:42 +00:00
{% endmacro %}
2021-02-19 19:37:51 +00:00
2020-09-01 14:57:42 +00:00
{% macro render_tags(tags) %}
2021-02-22 03:18:17 +00:00
<p>
2021-02-19 19:37:51 +00:00
Tags:
{% for tag in tags %}
2021-06-10 15:43:30 +00:00
<a class="has-text-info-dark has-text-weight-semibold" href="{{ get_taxonomy_url(kind='tags', name=tag) }}">
2021-02-22 03:18:17 +00:00
<span class="icon-text">
<span class="icon">
<i class="fas fa-tag"></i>
</span>
<span>{{tag}}</span>
2021-02-19 19:37:51 +00:00
</span>
</a>
{% endfor %}
</p>
2021-07-09 15:52:17 +00:00
{% endmacro %}