diff --git a/databags/nav-bar.ini b/databags/nav-bar.ini
new file mode 100644
index 0000000..f985126
--- /dev/null
+++ b/databags/nav-bar.ini
@@ -0,0 +1,24 @@
+[NavBar]
+Blog = '/blog'
+Rezept = '/rezept'
+mitglied = '/mitmachen'
+Kontakt = '/kontakt'
+
+
+[Rezept]
+show_projekt = '/rezept/'
+xml = '/feed_projekte.xml'
+
+
+[Kontakt]
+Kontakt = '/kontakt'
+Impressum = '/impressum'
+Datenschutz = '/datenschutz'
+
+[Blog]
+Alle-Beitraege = '/blog/'
+RSS-Feed = '/feed_blog.xml'
+
+[list]
+Rezept = '/rezept/'
+Blog = '/blog/'
diff --git a/databags/navigation.ini b/databags/navigation.ini
index 0ae752c..19541f5 100644
--- a/databags/navigation.ini
+++ b/databags/navigation.ini
@@ -7,7 +7,7 @@ Rezept = Rezepte
Kontakt = Kontakt
Impressum = Impressum
Datenschutz = Datenschutz
-xml = als XML-Feed
+xml = Rezepte als XML-Feed
mitglied = Werde Teil der Waffel Crew
Anfahrt = Anfahrt
fragen = Häufige Fragen
@@ -18,6 +18,8 @@ Englisch = English
falls = if available
show_projekt = Alle Rezepte
default_path = 'en'
+RSS-Feed = RSS Feed
+Alle-Beitraege = Alle Beiträge
[en]
home = Start
@@ -26,7 +28,7 @@ Rezept = Recipes
Kontakt = Contact
Impressum = Imprint
Datenschutz = Data protection
-xml = as XML feed
+xml = Recipes as XML feed
mitglied = become part of our waffle crew
Anfahrt = Approach
fragen = Frequently Asked Questions
@@ -37,4 +39,5 @@ English = English
falls = if available
show_projekt = All recipes
default_path = ''
-
+RSS-Feed = RSS Feed
+Alle-Beitraege = all news
diff --git a/templates/layout.html b/templates/layout.html
index eb0e32e..f6cca41 100644
--- a/templates/layout.html
+++ b/templates/layout.html
@@ -107,69 +107,36 @@
- {%
- if bag('navigation', this.alt, 'home') %}{{ bag('navigation', this.alt, 'home') }}{%
+ if bag('navigation', this.alt, 'home') %}{{ bag('navigation', this.alt, 'home') }}{%
else %}{{ bag('navigation', 'de', 'home') }}{% endif %}
{%
- for href, title, print in [
- ['/blog', 'Blog', 1],
- ['/rezept', 'Rezept', 1],
- ['/mitmachen', 'mitglied', 1],
- ['/hunger', 'Wo gibt es Waffeln?', 0],
- ['/kontakt', 'Kontakt', 1]
- ] %}{% if print %}
- - {%
- if bag('navigation', this.alt, title)
- %}{{ bag('navigation', this.alt, title) }}{%
- else %}{{ title }}{%
- endif %}{#
-
- Hier beginnt die vorhin erwähnt if-schleife,
- in der die Untermenüs definiert werden.
-
- PLZ Fix me!!!
-
- -> Eine Idee zum Fix wäre, die obige Tabelle ausweiten...
-
- #}{%
- if title == 'Rezept' %}
-
{% set root = site.get('/rezept/', alt=this.alt) %}{%
- for child in root.children recursive %}{% if loop.index <= 8 %}
- - {{ child.title }}
{%
- endif %}{% endfor %}
- - {%
- if bag('navigation', this.alt, 'show_projekt') %}{{ bag('navigation', this.alt, 'show_projekt') }}{%
- else %}{{ bag('navigation', 'de', 'show_projekt') }}{% endif %}
- - {%
- if bag('navigation', this.alt, title) %}{{ bag('navigation', this.alt, title) }}{%
- else %}{{ title }}{% endif %} {%
- if bag('navigation', this.alt, 'xml') %}{{ bag('navigation', this.alt, 'xml') }}{%
- else %}{{ bag('navigation', 'de', 'xml') }}{% endif %}
-
{%
- elif title == 'Kontakt' %}
- - {%
- if bag('navigation', this.alt, 'Kontakt') %}{{ bag('navigation', this.alt, 'Kontakt') }}{%
- else %}{{ bag('navigation', 'de', 'Kontakt') }}{% endif %}
- - {%
- if bag('navigation', this.alt, 'Impressum') %}{{ bag('navigation', this.alt, 'Impressum') }}{%
- else %}Impressum{% endif %}
- - {%
- if bag('navigation', this.alt, 'Datenschutz') %}{{ bag('navigation', this.alt, 'Datenschutz') }}{%
- else %}Datenschutz{% endif %}
-
{%
- elif title == 'Blog' %}
- {%
- endif %} {%
- endif %}{%
- endfor %}
+ for title, href in bag('nav-bar', "NavBar").items() %}
+ - {% if bag('navigation', this.alt, title) %}{{ bag('navigation', this.alt, title) }}{% else %}{{ title }}{% endif %}
+
+ {% if bag('nav-bar', 'list', title) %}
+ {% set root = site.get( bag('nav-bar', 'list', title), alt=this.alt) %}{%
+ for child in root.children recursive %}{% if loop.index <= 7 %}
+ -
+
+ {{ child.shorttitle if child.shorttitle else child.title }}
+
+ {% endif %}{% endfor %}
+ {% endif %}
+ {% if bag('nav-bar', title) %}
+ {% for nav_title, nav_url in bag('nav-bar', title).items() %}
+ -
+ {{ bag('navigation', this.alt, nav_title)
+ if bag('navigation', this.alt, nav_title)
+ else bag('navigation', 'de', nav_title) }}
+
+ {% endfor %}
+ {% endif %}
+
+
+ {% endfor %}
- {% if bag('navigation', this.alt, 'sprache') %}{{ bag('navigation', this.alt, 'sprache') }}{% else %}Sprache{% endif %}