webseite/templates/layout.html

105 lines
4.3 KiB
HTML

<!doctype html>
<html lang="de">
<head>
<!--
Namensschema der CSS-Klassen nach BEM (Block Element Modifier,
http://getbem.com/naming/). Mit der Erweiterung, dass Modifier einzeln
mit Bindestrich angegeben werden. Also:
<li class="navlist__navitem -active">
statt
<li class="navlist__navitem navlist__navitem--active">
Das ist weniger redundant und übersichtlicher. Der passende CSS-Selektor
dazu ist:
.navlist__navitem.-active
-->
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Werkkooperative der Technikfreundinnen eG</title>
<meta name="description" content="">
<link rel="stylesheet" href="{{ '/css/reset.css'|url }}">
<link rel="stylesheet" href="{{ '/css/fonts.css'|url }}">
<link rel="stylesheet" href="{{ '/css/style.css'|url }}">
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon-96x96.png">
<link rel="manifest" href="manifest.json">
</head>
<body>
<nav>
<div class="nav__toggle">
<svg viewBox="0 0 100 80" width="32" height="32">
<rect width="100" height="15"></rect>
<rect y="30" width="100" height="15"></rect>
<rect y="60" width="100" height="15"></rect>
</svg>
<p>menu</p>
</div>
<ul class="nav__navlist">
{% for title, mapping in bag("navigation").items() %}
<li class="nav__navitem
{%- if this._path == mapping.href or mapping.href != '/' and this.is_child_of(mapping.href) %}
-active
{%- endif -%}
">
<a class="nav__navlink {% if this._path == mapping.href %}-active{% endif %}" href="{{ mapping.href|url }}">
{{ title }}
</a>
{% if mapping.list_childs %}
<ul class="nav__sub_navlist">
{% set sub_menu = mapping['items'].items() %}
{% for sub_title, href in sub_menu %}
<li class="nav__sub_navitem {%- if this._path == href %} -active{%- endif %}">
<a class="nav__navlink {% if this._path == href %}-active{% endif %}" href="{{ href|url }}">
{{ sub_title }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</nav>
<header>
<div class="header__wrapper">
<h1 class="header__headding" id="top">
<a class="header__homelink" href="{{ '/'|url }}"" title="Startseite">
<img class="header__logo" src="{{ '/images/logo.svg'|url }}" alt="Werkkooperative der Technikfreundinnen eG" width="80%px">
</a>
</h1>
</div>
</header>
<main>
{% block body %}{% endblock %}
</main>
<footer>
<div class="footer__wrapper">
<ul class="footer__nav">
<li class="footer__navitem">
© Copyright 2020 VEBIT e.V.
</li>
<li class="footer__navitem">
<a class="footer__navlink" href="{{ 'licence'|url }}/archiv">MIT Lizenz</a>
</li>
<li class="footer__navitem">
<a class="footer__navlink" href="{{ 'imprint'|url }}/archiv">Impressum</a>
</li>
<li class="footer__navitem">
<a class="footer__navlink" href="{{ 'privacy_policy'|url }}/archiv">Datenschutzerklärung</a>
</li>
</ul>
</div>
</footer>
<script type="text/javascript" src="{{ '/js/nav_toggle.js'|url }}"></script>
</body>