diff --git a/routes/nt/ev/mk.js b/routes/nt/ev/mk.js
index d28417e..6cf9ca8 100644
--- a/routes/nt/ev/mk.js
+++ b/routes/nt/ev/mk.js
@@ -7,6 +7,97 @@ var pathoffset = 'nt/ev/mk/';
var _locals = { pathoffset : "/nt/ev/mk" };
+var _gliederung =
+ [
+ {
+ id : "gliederung",
+ name: "Gliederung",
+ subs: [
+ {
+ id : "index",
+ name: "Übersicht",
+ subs: []
+ },
+ {
+ id : "anfang",
+ name: "Anfang ...",
+ subs: []
+ },
+ {
+ id : "IIa_konzentr",
+ name: "IIA – Konzentrisch",
+ subs: []
+ },
+ {
+ id : "IIa_wegbereiter",
+ name: "IIA – Wegbereiter",
+ subs: []
+ },
+ {
+ id : "IIb_konzentr",
+ name: "IIB – Konzentrisch",
+ subs: []
+ },
+ {
+ id : "IIb_konzentr_ablehnung",
+ name: "IIB – Konzentrisch Ablehnung
",
+ subs: []
+ },
+ {
+ id : "IIb_konzentr_sendung",
+ name: "IIB – Konzentrisch Sendung
",
+ subs: []
+ },
+ {
+ id : "IIb_konzentr_hirte",
+ name: "IIB – Konzentrisch Hirte
",
+ subs: []
+ },
+ {
+ id : "IIc_konzentr",
+ name: "IIC – Konzentrisch",
+ subs: []
+ },
+ {
+ id : "IIIa",
+ name: "IIIA",
+ subs: []
+ },
+ {
+ id : "IIIa_gesplittet",
+ name: "IIIA – gesplittet",
+ subs: []
+ },
+ {
+ id : "IIIa_falsch_richtig",
+ name: "IIIA – Falsch – Richtig
",
+ subs: []
+ },
+ {
+ id : "III_sohn",
+ name: "III – Sohn
",
+ subs: []
+ },
+ {
+ id : "auf_dem_weg_konzentr",
+ name: "Auf dem Weg – Konzentrisch",
+ subs: []
+ },
+ {
+ id : "auf_dem_weg_konzentr2",
+ name: "Auf dem Weg – Konzentrisch 2",
+ subs: []
+ },
+ {
+ id : "IIIc_tempel_frucht",
+ name: "IIIC – Tempel – Frucht
",
+ subs: []
+ }
+ ]
+ },
+ ];
+
+
function get_locals(req) {
var locals = _locals;
locals.as_presentation = req.session.as_presentation;
@@ -17,16 +108,53 @@ function get_locals(req) {
}
router.get('/', function(req, res, next) {
+ var params = get_locals(req);
+ params.gliederung = _gliederung;
res.render(pathoffset+'index', get_locals(req));
});
-router.get('/gliederung', function(req,res,next) {
+router.get('/:layer1', function(req, res, next) {
+ var layer1 = _gliederung.find(elem => elem.id === req.params.layer1);
+ console.log(layer1);
+
+ if(layer1.subs.length === 0)
+ console.log('ERROR layer1.subs.length === 0');
+ var index = layer1.subs[0];
+
+ var params = get_locals(req);
+ params.gliederung = _gliederung;
+ params.current = [];
+ params.current.push(layer1);
+ params.current.push(index);
+ console.log(params);
+ res.render(pathoffset + req.params.layer1+"/"+index.id, params);
+});
+
+router.get('/:layer1/:layer2', function(req, res, next) {
+ var layer1 = _gliederung.find(elem => elem.id === req.params.layer1);
+ console.log(layer1);
+
+ var layer2 = layer1.subs.find(elem => elem.id === req.params.layer2);
+ console.log(layer2);
+
+ var params = get_locals(req);
+ params.gliederung = _gliederung;
+ params.current = [];
+ params.current.push(layer1);
+ params.current.push(layer2);
+ console.log(params);
+ res.render(pathoffset + req.params.layer1+"/"+layer2.id, params);
+});
+
+/*router.get('/gliederung', function(req,res,next) {
res.render(pathoffset+'gliederung/index', get_locals(req));
});
router.get('/gliederung/:target', function(req,res,next) {
res.render(pathoffset+'gliederung/' + req.params.target, get_locals(req));
-});
+});*/
+
+/* XXX */
/*router.get('/entstehung', function(req,res,next) {
res.render(pathoffset+'entstehung/quellen', get_locals(req));
diff --git a/views/nt/ev/mk/gliederung/III_sohn.pug b/views/nt/ev/mk/gliederung/III_sohn.pug
index fc33a76..b4562fa 100644
--- a/views/nt/ev/mk/gliederung/III_sohn.pug
+++ b/views/nt/ev/mk/gliederung/III_sohn.pug
@@ -3,9 +3,7 @@ include ../mixins
block headline
+headline
- +headline_item_gliederung
- +headline_item_active
- span III – Sohn
+ +navigation_auto(gliederung, current)
block content
@@ -138,4 +136,4 @@ block content
block bottomnav
- +bottom_gliederung("III_sohn")
+ +bottom_autonav(gliederung, current)
diff --git a/views/nt/ev/mk/gliederung/IIIa.pug b/views/nt/ev/mk/gliederung/IIIa.pug
index d470f52..57a4475 100644
--- a/views/nt/ev/mk/gliederung/IIIa.pug
+++ b/views/nt/ev/mk/gliederung/IIIa.pug
@@ -3,9 +3,7 @@ include ../mixins
block headline
+headline
- +headline_item_gliederung
- +headline_item_active
- span IIIA
+ +navigation_auto(gliederung, current)
block content
@@ -816,4 +814,4 @@ block content
block bottomnav
- +bottom_gliederung("IIIa")
+ +bottom_autonav(gliederung, current)
diff --git a/views/nt/ev/mk/gliederung/IIIa_falsch_richtig.pug b/views/nt/ev/mk/gliederung/IIIa_falsch_richtig.pug
index 14cf267..afe2868 100644
--- a/views/nt/ev/mk/gliederung/IIIa_falsch_richtig.pug
+++ b/views/nt/ev/mk/gliederung/IIIa_falsch_richtig.pug
@@ -3,9 +3,7 @@ include ../mixins
block headline
+headline
- +headline_item_gliederung
- +headline_item_active
- span IIIA – Falsch – Richtig
+ +navigation_auto(gliederung, current)
block content
@@ -151,4 +149,4 @@ block content
| Verfluchung/Verdorren des Feigenbaumes als Symbol für Unfruchtbarkeit und Tod
des Tempels.
block bottomnav
- +bottom_gliederung("IIIa_falsch_richtig")
+ +bottom_autonav(gliederung, current)
diff --git a/views/nt/ev/mk/gliederung/IIIa_gesplittet.pug b/views/nt/ev/mk/gliederung/IIIa_gesplittet.pug
index 8bb0bb4..e39b938 100644
--- a/views/nt/ev/mk/gliederung/IIIa_gesplittet.pug
+++ b/views/nt/ev/mk/gliederung/IIIa_gesplittet.pug
@@ -3,9 +3,7 @@ include ../mixins
block headline
+headline
- +headline_item_gliederung
- +headline_item_active
- span IIIA – Gesplittet
+ +navigation_auto(gliederung, current)
block content
@@ -563,4 +561,4 @@ block content
block bottomnav
- +bottom_gliederung("IIIa_gesplittet")
+ +bottom_autonav(gliederung, current)
diff --git a/views/nt/ev/mk/gliederung/IIIc_tempel_frucht.pug b/views/nt/ev/mk/gliederung/IIIc_tempel_frucht.pug
index 5212ae7..9f7bd3f 100644
--- a/views/nt/ev/mk/gliederung/IIIc_tempel_frucht.pug
+++ b/views/nt/ev/mk/gliederung/IIIc_tempel_frucht.pug
@@ -3,9 +3,7 @@ include ../mixins
block headline
+headline
- +headline_item_gliederung
- +headline_item_active
- span IIIC – Tempel – Frucht
+ +navigation_auto(gliederung, current)
block content
@@ -239,4 +237,4 @@ block content
block bottomnav
- +bottom_gliederung("IIIc_tempel_frucht")
+ +bottom_autonav(gliederung, current)
diff --git a/views/nt/ev/mk/gliederung/IIa_konzentr.pug b/views/nt/ev/mk/gliederung/IIa_konzentr.pug
index 9c78469..f648a27 100644
--- a/views/nt/ev/mk/gliederung/IIa_konzentr.pug
+++ b/views/nt/ev/mk/gliederung/IIa_konzentr.pug
@@ -3,9 +3,7 @@ include ../mixins
block headline
+headline
- +headline_item_gliederung
- +headline_item_active
- span IIA – Konzentrisch
+ +navigation_auto(gliederung, current)
block content
.card.konzentr-8.mb-2
@@ -103,4 +101,4 @@ block content
block bottomnav
- +bottom_gliederung("IIa_konzentr")
+ +bottom_autonav(gliederung, current)
diff --git a/views/nt/ev/mk/gliederung/IIa_wegbereiter.pug b/views/nt/ev/mk/gliederung/IIa_wegbereiter.pug
index 8f0e81d..28d3207 100644
--- a/views/nt/ev/mk/gliederung/IIa_wegbereiter.pug
+++ b/views/nt/ev/mk/gliederung/IIa_wegbereiter.pug
@@ -3,9 +3,7 @@ include ../mixins
block headline
+headline
- +headline_item_gliederung
- +headline_item_active
- span IIA – Wegbereiter
+ +navigation_auto(gliederung, current)
block content
@@ -576,4 +574,4 @@ block content
| Konflikt mit den Pharisäern
block bottomnav
- +bottom_gliederung("IIa_wegbereiter")
+ +bottom_autonav(gliederung, current)
diff --git a/views/nt/ev/mk/gliederung/IIb_konzentr.pug b/views/nt/ev/mk/gliederung/IIb_konzentr.pug
index 80a933a..77b56c7 100644
--- a/views/nt/ev/mk/gliederung/IIb_konzentr.pug
+++ b/views/nt/ev/mk/gliederung/IIb_konzentr.pug
@@ -3,9 +3,7 @@ include ../mixins
block headline
+headline
- +headline_item_gliederung
- +headline_item_active
- span IIB – Konzentrisch
+ +navigation_auto(gliederung, current)
block content
@@ -130,4 +128,4 @@ block content
| Unverständige Jünger
block bottomnav
- +bottom_gliederung("IIb_konzentr")
+ +bottom_autonav(gliederung, current)
diff --git a/views/nt/ev/mk/gliederung/IIb_konzentr_ablehnung.pug b/views/nt/ev/mk/gliederung/IIb_konzentr_ablehnung.pug
index 53ae07e..c77b1a2 100644
--- a/views/nt/ev/mk/gliederung/IIb_konzentr_ablehnung.pug
+++ b/views/nt/ev/mk/gliederung/IIb_konzentr_ablehnung.pug
@@ -3,9 +3,7 @@ include ../mixins
block headline
+headline
- +headline_item_gliederung
- +headline_item_active
- span IIB – Konzentrisch Ablehnung
+ +navigation_auto(gliederung, current)
block content
.card.konzentr-6.mb-2
@@ -62,4 +60,4 @@ block content
h6.card-subtitle.text-muted.bibelstelle Mk 6,45-52
block bottomnav
- +bottom_gliederung("IIb_konzentr_ablehnung")
+ +bottom_autonav(gliederung, current)
diff --git a/views/nt/ev/mk/gliederung/IIb_konzentr_hirte.pug b/views/nt/ev/mk/gliederung/IIb_konzentr_hirte.pug
index e7d7d3a..315fa9f 100644
--- a/views/nt/ev/mk/gliederung/IIb_konzentr_hirte.pug
+++ b/views/nt/ev/mk/gliederung/IIb_konzentr_hirte.pug
@@ -3,9 +3,7 @@ include ../mixins
block headline
+headline
- +headline_item_gliederung
- +headline_item_active
- span IIB – Konzentrisch Hirte
+ +navigation_auto(gliederung, current)
block content
.card.konzentr-4.mb-2
@@ -58,4 +56,4 @@ block content
block bottomnav
- +bottom_gliederung("IIb_konzentr_hirte")
+ +bottom_autonav(gliederung, current)
diff --git a/views/nt/ev/mk/gliederung/IIb_konzentr_sendung.pug b/views/nt/ev/mk/gliederung/IIb_konzentr_sendung.pug
index fee6282..c9f7340 100644
--- a/views/nt/ev/mk/gliederung/IIb_konzentr_sendung.pug
+++ b/views/nt/ev/mk/gliederung/IIb_konzentr_sendung.pug
@@ -3,9 +3,7 @@ include ../mixins
block headline
+headline
- +headline_item_gliederung
- +headline_item_active
- span IIB – Konzentrisch Sendung
+ +navigation_auto(gliederung, current)
block content
.card.konzentr-6.mb-2
@@ -57,4 +55,4 @@ block content
h6.card-subtitle.text-muted.bibelstelle Mk 6,17-29
block bottomnav
- +bottom_gliederung("IIb_konzentr_sendung")
+ +bottom_autonav(gliederung, current)
diff --git a/views/nt/ev/mk/gliederung/IIc_konzentr.pug b/views/nt/ev/mk/gliederung/IIc_konzentr.pug
index 1e0f13e..0a1ed7f 100644
--- a/views/nt/ev/mk/gliederung/IIc_konzentr.pug
+++ b/views/nt/ev/mk/gliederung/IIc_konzentr.pug
@@ -3,9 +3,7 @@ include ../mixins
block headline
+headline
- +headline_item_gliederung
- +headline_item_active
- span IIC – Konzentrisch
+ +navigation_auto(gliederung, current)
block content
.card.konzentr-7.mb-2
@@ -84,4 +82,4 @@ block content
block bottomnav
- +bottom_gliederung("IIc_konzentr")
+ +bottom_autonav(gliederung, current)
diff --git a/views/nt/ev/mk/gliederung/anfang.pug b/views/nt/ev/mk/gliederung/anfang.pug
index de480a7..420aaae 100644
--- a/views/nt/ev/mk/gliederung/anfang.pug
+++ b/views/nt/ev/mk/gliederung/anfang.pug
@@ -3,9 +3,7 @@ include ../mixins
block headline
+headline
- +headline_item_gliederung
- +headline_item_active
- span Anfang ...
+ +navigation_auto(gliederung, current)
block content
@@ -634,4 +632,4 @@ block content
block bottomnav
- +bottom_gliederung("anfang")
+ +bottom_autonav(gliederung, current)
diff --git a/views/nt/ev/mk/gliederung/auf_dem_weg_konzentr.pug b/views/nt/ev/mk/gliederung/auf_dem_weg_konzentr.pug
index 71e72da..c874788 100644
--- a/views/nt/ev/mk/gliederung/auf_dem_weg_konzentr.pug
+++ b/views/nt/ev/mk/gliederung/auf_dem_weg_konzentr.pug
@@ -3,9 +3,7 @@ include ../mixins
block headline
+headline
- +headline_item_gliederung
- +headline_item_active
- span Auf dem Weg – Konzentrisch
+ +navigation_auto(gliederung, current)
block content
@@ -112,4 +110,4 @@ block content
block bottomnav
- +bottom_gliederung("auf_dem_weg_konzentr")
+ +bottom_autonav(gliederung, current)
diff --git a/views/nt/ev/mk/gliederung/auf_dem_weg_konzentr2.pug b/views/nt/ev/mk/gliederung/auf_dem_weg_konzentr2.pug
index acaa07c..78e75c9 100644
--- a/views/nt/ev/mk/gliederung/auf_dem_weg_konzentr2.pug
+++ b/views/nt/ev/mk/gliederung/auf_dem_weg_konzentr2.pug
@@ -3,9 +3,7 @@ include ../mixins
block headline
+headline
- +headline_item_gliederung
- +headline_item_active
- span Auf dem Weg – Konzentrisch 2
+ +navigation_auto(gliederung, current)
block content
.viewbox.konzentr-8
@@ -257,4 +255,4 @@ block content
| Wie Christus, der Menschensohn, dienen: Denn auch der Menschensohn ...
block bottomnav
- +bottom_gliederung("auf_dem_weg_konzentr2")
+ +bottom_autonav(gliederung, current)
diff --git a/views/nt/ev/mk/gliederung/index.pug b/views/nt/ev/mk/gliederung/index.pug
index 82f7b84..62a585e 100644
--- a/views/nt/ev/mk/gliederung/index.pug
+++ b/views/nt/ev/mk/gliederung/index.pug
@@ -3,10 +3,8 @@ include ../mixins
block headline
+headline
- +headline_item_gliederung
- +headline_item_active
- span Übersicht
-
+ +navigation_auto(gliederung, current)
+
block content
.row
@@ -589,4 +587,4 @@ block content
p.card-text.small
i Vom Zurückweisen
zum Herrufen
.
block bottomnav
- +bottom_gliederung("index")
+ +bottom_autonav(gliederung, current)
diff --git a/views/nt/ev/mk/index.pug b/views/nt/ev/mk/index.pug
index 550200c..108c454 100644
--- a/views/nt/ev/mk/index.pug
+++ b/views/nt/ev/mk/index.pug
@@ -3,8 +3,15 @@ include mixins
block headline
+headline
- +headline_item_active
- span Start
+ ol.breadcrumb(onclick="show_all_slides();", style="margin-top: .5rem; border-radius: 0;")
+ .h1(style="margin-bottom: 0px; color: #0e4f88; width: 100%;") Start
+ span.small.dropdown
+ a.dropdown-toggle(data-toggle="dropdown", href="#", style="margin-bottom: 0px; color: #0e4f88; width: 100%;")
+ .dropdown-menu
+ a.dropdown-item(href="#")
+ b Start
+ each sub in gliederung
+ a.dropdown-item(href=pathoffset + "/" + sub.id) !{sub.name}
block content
@@ -55,10 +62,14 @@ block content
p
| Dies alles zeigt, dass man sich zunächst mit der Gliederung des Evangeliums vertraut machen sollte.
-
-
-
-
block bottomnav
- +bottom_nav("start")
+ hr(style="margin-top: 2rem; border-top-width: 7px; border-top-color: #a4d0fd;")
+ ul.nav.nav-fill.nav-pills(style="padding-left: 1rem; padding-right: 1rem;")
+ li.nav-item
+ a.nav-link.active(href="#") Start
+ each item in gliederung
+ - var my_fullpath = pathoffset + "/" + item.id;
+
+ li.nav-item
+ a.nav-link(href=my_fullpath) !{item.name}
diff --git a/views/nt/ev/mk/mixins.pug b/views/nt/ev/mk/mixins.pug
index 1b48920..77e940c 100644
--- a/views/nt/ev/mk/mixins.pug
+++ b/views/nt/ev/mk/mixins.pug
@@ -4,7 +4,7 @@ mixin footnote(content)
mixin symbol(s)
span.oi(class="oi-"+s)
span
-
+
mixin headline
div(style="margin-top: 15px; padding-left: 1rem; padding-right: 1rem;")
table(style="font-size: 80%; font-variant: small-caps; margin-bottom: 0px; width: 100%;")
@@ -16,21 +16,76 @@ mixin headline
a(href="http://www.halieus.de/impressum_datenschutz.html" target="_blank") Impressum & Datenschutzerklärung
p(style="font-size: 130%; font-variant: small-caps; margin-bottom: 0px;")
b Einführung in das Evangelium nach Markus
- ol.breadcrumb(onclick="show_all_slides();", style="margin-top: .5rem; border-radius: 0;")
- block
-mixin headline_item_start
- li.breadcrumb-item
- a(href=pathoffset+"/") Start
-
-mixin headline_item_gliederung
- li.breadcrumb-item
- a(href=pathoffset+"/gliederung") Gliederung
+mixin navigation_auto(gliederung, current)
+ ol.breadcrumb(onclick="show_all_slides();", style="margin-top: .5rem; border-radius: 0;")
+ li.breadcrumb-item
+ a(href=pathoffset+"/") Start
+ - var nr_items = current.length;
+ - var cnt = 0;
+ - var subs = gliederung;
+ - var fullpath = pathoffset;
+ - var old_fullpath;
+ each item in current
+ - cnt = cnt+1;
+ - old_fullpath = fullpath;
+ - fullpath = fullpath + "/" + item.id;
+ if(cnt != nr_items)
+ li.breadcrumb-item
+ a(href=fullpath) !{item.name}
+ if(subs.length > 1)
+ each sub in subs
+ if(sub.id != item.id)
+ div #{sub.name}
+ else
+ li.breadcrumb-item
+ .h1(style="margin-bottom: 0px; color: #0e4f88; width: 100%;") !{item.name}
+ if(subs.length > 1)
+ span.small.dropdown
+ a.dropdown-toggle(data-toggle="dropdown", href="#", style="margin-bottom: 0px; color: #0e4f88; width: 100%;")
+ .dropdown-menu
+ each sub in subs
+ a.dropdown-item(href=old_fullpath + "/" + sub.id)
+ if(sub.id === item.id)
+ b !{sub.name}
+ else
+ span !{sub.name}
+
+ - subs = item.subs;
+
+mixin bottom_autonav(gliederung, current)
+ hr(style="margin-top: 2rem; border-top-width: 7px; border-top-color: #a4d0fd;")
+ ul.nav.nav-fill.nav-pills(style="padding-left: 1rem; padding-right: 1rem;")
+ li.nav-item
+ a.nav-link(href=pathoffset+"/") Start
+ - var nr_items = current.length;
+ - var fullpath = pathoffset;
+
+ each item in gliederung
+ - var my_fullpath = fullpath + "/" + item.id;
+
+ if(item.id === current[0].id)
+ li.nav-item
+ a.nav-link.active !{item.name}
+ else
+ li.nav-item
+ a.nav-link(href=my_fullpath) !{item.name}
-mixin headline_item_active
- li.breadcrumb-item
- .h1(style="margin-bottom: 0px; color: #0e4f88; width: 100%;")
- block
+ if(nr_items > 1)
+ hr(style="border-top-width: 5px; border-top-color: #a4d0fd")
+ .small(style="margin-top: 3px;")
+ ul.nav.nav-fill.nav-pills.pill-sub-1
+ - fullpath = fullpath + "/" + current[0].id;
+ each item in current[0].subs
+ - var my_fullpath = fullpath + "/" + item.id;
+ if(item.id === current[1].id)
+ li.nav-item
+ a.nav-link.active !{item.name}
+ else
+ li.nav-item
+ a.nav-link(href=my_fullpath) !{item.name}
+
+
mixin bottom_nav_item(active, short, href, name)
if(active===short)