blube.club/templates/macros.html

183 lines
5.1 KiB
HTML

{% macro social_links(social_config) %}
<p>
{% if social_config.google_scholar %}
<a href="https://scholar.google.com/citations?user={{ social_config.google_scholar }}" target="_blank">
<span class="icon is-large" title="Google Scholar">
<i class="ai ai-google-scholar ai-lg"></i>
</span>
</a>
{% endif %}
{% if social_config.orcid %}
<a href="https://orcid.org/{{ social_config.orcid }}" target="_blank">
<span class="icon is-large" title="ORCiD">
<i class="fab fa-orcid fa-lg"></i>
</span>
</a>
{% endif %}
{% if social_config.facebook %}
<a href="https://facebook.com/{{ social_config.facebook }}" target="_blank">
<span class="icon is-large" title="Facebook">
<i class="fab fa-facebook fa-lg"></i>
</span>
</a>
{% endif %}
{% if social_config.twitter %}
<a href="https://twitter.com/{{ social_config.twitter }}" target="_blank">
<span class="icon is-large" title="Twitter">
<i class="fab fa-twitter fa-lg"></i>
</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">
<i class="fab fa-linkedin fa-lg"></i>
</span>
</a>
{% endif %}
{% 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.stackoverflow %}
<a href="https://stackoverflow.com/users/{{ social_config.stackoverflow }}" target="_blank">
<span class="icon is-large" title="Stack Overflow">
<i class="fab fa-stack-overflow 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.instagram %}
<a href="https://www.instagram.com/{{ social_config.instagram}}" target="_blank">
<span class="icon is-large" title="Instagram">
<i class="fab fa-instagram fa-lg"></i>
</span>
</a>
{% endif %}
{% if social_config.behance %}
<a href="https://www.behance.net/{{ social_config.behance }}" target="_blank">
<span class="icon is-large" title="Behance">
<i class="fab fa-behance 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 social_config.medium %}
<a href="https://medium.com/@{{ social_config.medium }}" target="_blank">
<span class="icon is-large" title="Medium">
<i class="fab fa-medium fa-lg"></i>
</span>
</a>
{% endif %}
{% if social_config.googleplay %}
<a href="https://play.google.com/store/apps/developer?id={{ social_config.googleplay }}&hl=en" target="_blank">
<span class="icon is-large" title="Google play">
<i class="fab fa-google-play 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="fas fa-user"></i>
</span>
<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>
{% 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 class="icon">
<i class="fas fa-pencil-alt"></i>
</span>
<span>{{ page.word_count }} words</span>
</span>
{% endmacro %}
{% macro render_categories(categories) %}
<p>
Categories:
{% for category in categories %}
<a class="has-text-info-dark has-text-weight-semibold" href="{{ get_taxonomy_url(kind='categories', name=category) }}">
<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="{{ get_taxonomy_url(kind='tags', name=tag) }}">
<span class="icon-text">
<span class="icon">
<i class="fas fa-tag"></i>
</span>
<span>{{tag}}</span>
</span>
</a>
{% endfor %}
</p>
{% endmacro %}