site/templates/base.html

100 lines
5.2 KiB
HTML
Raw Permalink Normal View History

2020-08-11 16:14:38 +02:00
{%- import "macros.html" as macros -%}
<!DOCTYPE html>
<html lang="{{ lang }}" class="has-background-light">
2020-08-11 16:14:38 +02:00
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
2022-02-11 21:01:16 +01:00
<title>{% block title %}{% if page.title %}{{ page.title }} {% endif %}{{ config.title }}{% endblock title %}</title>
2020-08-11 16:14:38 +02:00
{%- 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 %}
2021-12-11 17:34:56 +01:00
<meta name="description" content="{% if page.description %}{{ page.description | trim }}{% else %}{{ config.description | trim }}{% endif %}">
2020-08-11 16:14:38 +02:00
{%- endblock metadata %}
</head>
<body>
2022-01-22 15:03:55 +01:00
{%- if config.base_url is containing("staging") %}
<div id="staging-overlay"></div>
{%- endif %}
2020-08-11 16:14:38 +02:00
<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>
2020-08-11 16:14:38 +02:00
</aside>
</div>
</div>
<footer class="footer">
Generiert mit freier Software (<a href="https://git.sbruder.de/schulischer-schabernack/site">Quelltext</a>).
</footer>
2020-08-11 16:14:38 +02:00
</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>