site/templates/base.html

100 lines
5.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{%- import "macros.html" as macros -%}
<!DOCTYPE html>
<html lang="{{ lang }}" class="has-background-light">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{% if page.title %}{{ macros::title(page=page) }} {% endif %}{{ config.title }}{% endblock title %}</title>
{%- for format in config.extra.formats %}
<link rel="alternate" type="application/rss+xml" title="Podcast Feed: {{ config.title }} ({{ format.name }})" href="{{ get_url(path="formats/" ~ format.ext ~ "/rss.xml") | safe }}">
{%- endfor %}
{%- block styles %}
<link rel="stylesheet" href="{{ get_url(path="style.css") | safe }}">
{%- endblock styles %}
{%- block preload %}
<link rel="preload" href="{{ get_url(path="vendor/podlove-subscribe-button/stylesheets/app.css") | safe }}" as="style">
<link rel="preload" href="{{ get_url(path="vendor/podlove-subscribe-button/javascripts/app.js") | safe }}" as="script">
<link rel="preload" href="{{ get_url(path="vendor/podlove-subscribe-button/fonts/podlove/Podlove.woff") | safe }}" as="font" crossorigin="anonymous">
<link rel="preload" href="{{ get_url(path="vendor/podlove-subscribe-button/fonts/podlove/Podlove.ttf") | safe }}" as="font" crossorigin="anonymous">
<link rel="preload" href="{{ get_url(path="vendor/podlove-subscribe-button/fonts/roboto_light/Roboto-Light-webfont.woff") | safe }}" as="font" crossorigin="anonymous">
<link rel="preload" href="{{ get_url(path="vendor/podlove-subscribe-button/fonts/roboto_light/Roboto-Light-webfont.ttf") | safe }}" as="font" crossorigin="anonymous">
<link rel="preload" href="{{ get_url(path="vendor/podlove-subscribe-button/fonts/roboto_medium/Roboto-Medium-webfont.woff") | safe }}" as="font" crossorigin="anonymous">
<link rel="preload" href="{{ get_url(path="vendor/podlove-subscribe-button/fonts/roboto_medium/Roboto-Medium-webfont.ttf") | safe }}" as="font" crossorigin="anonymous">
{%- endblock prefetch %}
{%- block metadata %}
<meta name="description" content="{% if page.description %}{{ page.description | trim }}{% else %}{{ config.description | trim }}{% endif %}">
{%- endblock metadata %}
</head>
<body>
{%- if config.base_url is containing("staging") %}
<div id="staging-overlay"></div>
{%- endif %}
<div class="container has-background-white" id="page-wrapper">
{%- block banner %}
<a href="{{ get_url(path="/") }}"><img id="banner" src="{{ get_url(path="assets/banner.jpg") | safe }}" alt="Banner von {{ config.title }}"></a>
{%- endblock %}
{%- block navbar %}
<nav class="navbar is-dark">
<div class="navbar-brand">
<a role="button" class="navbar-burger burger" aria-label="Menü öffnen" aria-expanded="false" data-target="navbar">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navbar" class="navbar-menu">
<div class="navbar-start">
{%- for link in config.extra.navbar.links %}
<a class="navbar-item{% if current_path == link.target %} is-active{% endif %}" href="{{ get_url(path=link.target) | safe }}"{% if current_path == link.target %} aria-current="page"{% endif %}>
{{ link.title }}
</a>
{%- endfor %}
</div>
</div>
</nav>
{%- endblock navbar %}
<div id="main-wrapper">
<div class="columns is-variable is-8">
<main class="column is-three-quarters" aria-label="Hauptinhalt">
{% block content %}{% endblock content %}
</main>
<aside class="column" aria-label="Sekundärer Inhalt">
<h3>{{ config.title }}</h3>
{{ macros::podlove_subscribe_button(size="big") }}
<p id="navbar-description" class="is-size-7">{{ config.description }}</p>
</aside>
</div>
</div>
<footer class="footer">
Generiert mit freier Software (<a href="https://git.sbruder.de/schulischer-schabernack/site">Quelltext</a>).
</footer>
</div>
{% block scripts -%}
<script src="{{ get_url(path="assets/main.js") | safe }}"></script>
<script id="config-subscribe-button" type="application/json">
{
"title": {{ config.title | json_encode | safe }},
"subtitle": {{ config.extra.subtitle | json_encode | safe }},
"description": {{ config.description | json_encode | safe }},
"cover": {{ get_url(path="assets/poster.jpg") | json_encode | safe }},
"feeds": [
{%- for format in config.extra.formats %}
{
"type": "audio",
"format": {{ format.codec | json_encode | safe }},
"url": {{ get_url(path="formats/" ~ format.ext ~ "/rss.xml") | json_encode | safe }},
"variant": "high"
}{% if not loop.last %},{% endif %}
{%- endfor %}
]
}
</script>
<script>
window.podcastData = JSON.parse(document.getElementById("config-subscribe-button").innerText)
</script>
{%- endblock scripts %}
</body>
</html>