zola-inky-fork/templates/base.html
2023-12-09 16:21:50 +01:00

140 lines
5.2 KiB
HTML

{% import "macros/head.html" as head -%}
{% import "macros/opengraph.html" as social -%}
{% import "macros/hooks.html" as hooks -%}
{% import "macros/images.html" as images -%}
<!DOCTYPE html>
<html lang="en" prefix="og: https://ogp.me/ns#">
<head>
{%- block general_meta -%}
{{ head::general_meta() }}
{%- endblock general_meta -%}
{%- block og_preview -%}
{{ social::og_preview() }}
{%-endblock og_preview -%}
{% block rss -%}
<link rel="alternate"
type="application/rss+xml"
title="{{config.title}}"
href="{{ get_url(path='atom.xml',trailing_slash=false)|safe}}">
{% endblock rss -%}
{% if config.extra.google_analytics_tag_id -%}
<!-- Google Analytics tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ config.extra.google_analytics_tag_id }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ config.extra.google_analytics_tag_id }}');
</script>
{% endif -%}
<link rel="stylesheet"
href="{{ get_url(path='base.css',trailing_slash=false)|safe}}">
<link rel="stylesheet"
href="{{ get_url(path='fork-awesome/fork-awesome.css',trailing_slash=false)|safe}}">
</head>
<body>
<header>
{% if config.extra.avatar -%}
<div class="avatar">
<a href="/">
{{ images::responsive_image(path="", src=config.extra.avatar, default_size=128, sizes=[64,128,256], alt=config.title ) }}
</a>
</div>
{% endif -%}
<a class="site-name"
href="/">
<h1>{{ config.title }}</h1>
</a>
<div class="site-description">
<p>{{ config.description }}</p>
</div>
<nav>
<div class="links">
{% for menu_link in config.extra.menu_links -%}
{% set link_url = menu_link.url | replace(from="$BASE_URL", to=config.base_url) -%}
<a {% if current_url and current_url==link_url %}class="active" {% endif %}
href="{{ link_url | safe}} ">{{menu_link.name}}</a>
{% endfor -%}
</div>
</nav>
</header>
<article>
{% block content -%}
{% endblock -%}
</article>
<footer>
{% block footer_left -%}
<div class="social">
<ul>
{# Github #}
{% if config.extra.link_github_username -%}
<li>
<a href="https://github.com/{{ config.extra.link_github_username }}"
title="Github" rel="me"><i class="fa fa-github"></i></a>
</li>
{% endif -%}
{# Mastadon #}
{% if config.extra.link_mastodon_url -%}
<li>
<a href="{{ config.extra.link_mastodon_url }}"
title="Mastodon" rel="me"><i class="fa fa-mastodon"></i></a>
</li>
{% endif -%}
{# Twitter #}
{% if config.extra.link_twitter_username -%}
<li>
<a href="https://twitter.com/{{ config.extra.link_twitter_username }}"
title="Twitter"
rel="me"><i class="fa fa-twitter"></i></a>
</li>
{% endif -%}
{# Instagram #}
{% if config.extra.link_instagram_username -%}
<li>
<a href="https://www.instagram.com/jimmyff_art/{{ config.extra.link_instagram_username }}"
title="Instagram"
rel="me"><i class="fa fa-instagram"></i></a>
</li>
{% endif -%}
{# Medium #}
{% if config.extra.link_medium_username -%}
<li>
<a href="https://medium.com/@{{ config.extra.link_medium_username }}"
title="Medium"
rel="me"><i class="fa fa-medium"></i></a>
</li>
{% endif -%}
{# RSS feed #}
<li>
<a href="{{ get_url(path='atom.xml',trailing_slash=false)|safe }}"
title="{{config.title}}"><i class="fa fa-rss"></i></a>
</li>
</ul>
{% endblock footer_left -%}
</div>
<p>
{% block footer_center -%}
{% endblock footer_center -%}
</p>
<p>
{% block footer_right -%}
© {{ config.title }} {{ now() | date(format="%Y") }}
{# If you remove the powered by information, it would be appreciated if
you could add information & links somewhere else on your site to credit
those that have created your tools. #}
{% if config.extra.disable_powered_by and config.extra.disable_powered_by == true %}{% else %}<br>Powered by <a target="_blank" href="https://getzola.org/">Zola</a>. Theme: <a target="_blank" href="https://github.com/jimmyff/zola-inky">Inky</a>.{% endif %}
{% endblock footer_right -%}
</p>
</footer>
{% block body_end -%}
{% endblock body_end -%}
</body>
</html>