site/templates/base.html
Simon Bruder 4817f92495
Make navbar handle longer descriptions better
This is achieved by using a smaller font and enabling hyphenation (where
possible) and justification.
2021-11-30 21:32:18 +01:00

94 lines
4.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{%- import "macros.html" as macros -%}
<!DOCTYPE html>
<html lang="{{ config.default_language }}" 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 }}{% else %}{{ config.description }}{% endif %}">
{%- endblock metadata %}
</head>
<body>
<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>
</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>