Improve menu

This commit is contained in:
L3D 2019-02-24 16:12:11 +01:00
parent 2ede7862b4
commit 31611b8ac4

View file

@ -76,21 +76,21 @@
else %}{{ bag('navigation', 'de', 'home') }}{% endif %}</a></li>{%
for href, title, print in [
['/blog', 'Blog', 1],
['/projekte', 'Projekte', 1],
['/verein', 'Verein', 1],
['/termine', 'Kalender', 1],
['/rezept', 'Rezept', 1],
['/mitmachen', 'Mitmachen', 1],
['/hunger', 'Wo gibt es Waffeln?', 1],
['/kontakt', 'Kontakt', 1]
] %}{% if print %}
<li{% if this.is_child_of(href) %} class="active"{% endif
%}><a href="{{ href|url }}">{% if bag('navigation', this.alt, title) %}{{ bag('navigation', this.alt, title) }}{% else %}{{ title }}{% endif %}</a>{%
if title == 'Projekte' %}
<ul>{% set root = site.get('/projekte/', alt=this.alt) %}{%
for child in root.children recursive %}{% if loop.index <= 7 %}
if title == 'Rezept' %}
<ul>{% set root = site.get('/rezept/', alt=this.alt) %}{%
for child in root.children recursive %}{% if loop.index <= 8 %}
<li{%
if this._path == child._path %} class="active"{% endif
%}><a href="{% if this.alt == 'de' %}{% else %}/{{ this.alt }}/{{ this.alt }}/{% endif %}{{ child|url }}">{{ child.title }}</a></li>{%
endif %}{% endfor %}
<li><a href="{{ '/projekte/'|url }}">{%
<li><a href="{{ '/rezept/'|url }}">{%
if bag('navigation', this.alt, 'show_projekt') %}{{ bag('navigation', this.alt, 'show_projekt') }}{%
else %}{{ bag('navigation', 'de', 'show_projekt') }}{% endif %}</a></li>
<li><a href="{{ '/feed_projekte.xml'|url }}">{%
@ -99,37 +99,6 @@
if bag('navigation', this.alt, 'xml') %}{{ bag('navigation', this.alt, 'xml') }}{%
else %}{{ bag('navigation', 'de', 'xml') }}{% endif %}</a></li>
</ul>{%
elif title == 'Verein' %}
<ul><li><a href="{{ '/vereinsheim'|url }}">{%
if bag('navigation', this.alt, 'Vereinsheim') %}{{ bag('navigation', this.alt, 'Vereinsheim') }}{%
else %}{{ bag('navigation', 'de', 'Vereinsheim') }}{% endif %}</a></li>
<li><a href="{{ '/vereinsheim/elektrowerkstatt'|url }}">{%
if bag('navigation', this.alt, 'Elektrowerkstatt') %}{{ bag('navigation', this.alt, 'Elektrowerkstatt') }}{%
else %}{{ bag('navigation', 'de', 'Elektrowerkstatt') }}{% endif %}</a></li>
<li><a href="{{ '/vereinsheim/grobwerkstatt'|url }}">{%
if bag('navigation', this.alt, 'Grobwerkstatt') %}{{ bag('navigation', this.alt, 'Grobwerkstatt') }}
{% else %}{{ bag('navigation', 'de', 'Grobwerkstatt') }}{% endif %}</a></li>
<li><a href="{{ '/vereinsheim/lounge'|url }}">{%
if bag('navigation', this.alt, 'Lounge') %}{{ bag('navigation', this.alt, 'Lounge') }}{%
else %}{{ bag('navigation', 'de', 'Lounge') }}{% endif %}</a></li>
<li><a href="{{ '/verein/presse'|url }}">{%
if bag('navigation', this.alt, 'Presse') %}{{ bag('navigation', this.alt, 'Presse') }}{%
else %}{{ bag('navigation', 'de', 'Presse') }}{% endif %}</a></li>
<li><a href="https://tbbs.me">{%
if bag('navigation', this.alt, 'Wiki') %}{{ bag('navigation', this.alt, 'Wiki') }}{%
else %}{{ bag('navigation', 'de', 'Wiki') }}{% endif %}</a></li>
<li><a href="{{ '/verein/dokumente'|url }}">{%
if bag('navigation', this.alt, 'satzung') %}{{ bag('navigation', this.alt, 'satzung') }}{%
else %}{{ bag('navigation', 'de', 'satzung') }}{% endif %}</a></li>
<li><a href="{{ '/mitglied-werden'|url }}" class="button special">{%
if bag('navigation', this.alt, 'mitglied') %}{{ bag('navigation', this.alt, 'mitglied') }}{%
else %}{{ bag('navigation', 'de', 'mitglied') }}{% endif %}</a></li>
<li><a href="{{ '/verein/spenden'|url }}">{%
if bag('navigation', this.alt, 'spenden') %}{{ bag('navigation', this.alt, 'spenden') }}{%
else %}{{ bag('navigation', 'de', 'spenden') }}{% endif %}</a></li>
<li><a href="{{ '/antworten'|url }}">{%
if bag('navigation', this.alt, 'fragen') %}{{ bag('navigation', this.alt, 'fragen') }}{%
else %}{{ bag('navigation', 'de', 'fragen') }}{% endif %}</a></li></ul>{%
elif title == 'Kontakt' %}
<ul><li><a href="{{ '/kontakt'|url }}">{%
if bag('navigation', this.alt, 'Kontakt') %}{{ bag('navigation', this.alt, 'Kontakt') }}{%