diff --git a/views/mixins_headline_nav.pug b/views/mixins_headline_nav.pug new file mode 100644 index 0000000..4698800 --- /dev/null +++ b/views/mixins_headline_nav.pug @@ -0,0 +1,130 @@ +mixin headline_presentation_hamburger + .dropdown + .dropdown-toggle(data-toggle="dropdown", style="display: block; background: #555; width: 32px; height: 28px; position: relative; margin-left: auto; margin-right: 0px; border-radius: 4px; ") + //- margin-right: auto; (normalerweise) + span(style="top: 4px; position: absolute; left:4px; height: 4px; width: 24px; background: #fff; border-radius: 2px; display: block; ") + span(style="top: 12px; position: absolute; left:4px; height: 4px; width: 24px; background: #fff; border-radius: 2px; display: block; ") + span(style="top: 20px; position: absolute; left:4px; height: 4px; width: 24px; background: #fff; border-radius: 2px; display: block; ") + .dropdown-menu + .dropdown-item + input.form-check-input#check_as_presentation(type="checkbox") + label.form-check-label(for="check_as_presentation") Als Präsentation + //- , onclick="event.stopPropagation();" + +mixin headline_presentation_script + script. + var check_as_presentation = sessionStorage.getItem('show_as_presentation'); + if(check_as_presentation === null) { + console.log('no "show_as_presentation" in sessionStorage; set to false') + check_as_presentation = false; + sessionStorage.setItem('show_as_presentation', false); + } + else + check_as_presentation = JSON.parse(check_as_presentation); + + console.log("show_as_presentation: ", check_as_presentation); + + $('#check_as_presentation').prop('checked', check_as_presentation); + console.log($('#check_as_presentation').prop('checked')) + + $('#check_as_presentation').change(function() { + console.log('change'); + console.log($('#check_as_presentation').prop('checked')); + sessionStorage.setItem('show_as_presentation', $('#check_as_presentation').prop('checked')); + location.reload(); + }); + +mixin body_presentation_script + script. + if(JSON.parse(sessionStorage.getItem('show_as_presentation'))) + register_presentationkeys(); + else + show_all_slides(); + +mixin headline_template(title) + 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%;") + tr + td(style="padding: 0px;") + b + a(href="/") BibelWissen.Halieus.DE + td(style="padding: 0px; text-align: right;") + 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 + table(style="margin-bottom: 0px; width: 100%;") + tr + td(style="padding: 0px; font-size: 130%; font-variant: small-caps;") + b !{title} + td(style="padding: 0px; text-align: right;") + +headline_presentation_hamburger + + +headline_presentation_script + +mixin navigation_auto_template(gliederung, current, bgcolor) + 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 + .h3(style="margin-bottom: 0px; color: "+bgcolor+"; width: 100%;") !{item.name}  + if(subs.length > 1) + span.small.dropdown + a.dropdown-toggle(data-toggle="dropdown", href="#", style="margin-bottom: 0px; color: "+bgcolor+"; 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_template(gliederung, current, hrcolor) + hr(style="margin-top: 2rem; border-top-width: 7px; border-top-color: "+hrcolor+";") + 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} + + if(nr_items > 1) + hr(style="border-top-width: 5px; border-top-color: "+hrcolor+";") + .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} diff --git a/views/nt/ev/lk/layout.pug b/views/nt/ev/lk/layout.pug index 8bf5b90..1bc168f 100644 --- a/views/nt/ev/lk/layout.pug +++ b/views/nt/ev/lk/layout.pug @@ -1,4 +1,5 @@ include ../../../mixins_cookies +include ../../../mixins_headline_nav doctype html html(lang='de') @@ -28,11 +29,7 @@ html(lang='de') script(src='/javascripts/bootstrap.min.js') - script. - if(JSON.parse(sessionStorage.getItem('show_as_presentation'))) - register_presentationkeys(); - else - show_all_slides(); + +body_presentation_script +cookies_html +cookies_script diff --git a/views/nt/ev/lk/mixins.pug b/views/nt/ev/lk/mixins.pug index bf3d853..84b642c 100644 --- a/views/nt/ev/lk/mixins.pug +++ b/views/nt/ev/lk/mixins.pug @@ -6,16 +6,7 @@ mixin symbol(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%;") - tr - td(style="padding: 0px;") - b - a(href="/") BibelWissen.Halieus.DE - td(style="padding: 0px; text-align: right;") - 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 Mit dem Evangelium nach Lukas durch das Kirchenjahr + +headline_template("Mit dem Evangelium nach Lukas durch das Kirchenjahr") ol.breadcrumb(onclick="show_all_slides();", style="margin-top: .5rem; border-radius: 0;") block diff --git a/views/nt/ev/mk/index.pug b/views/nt/ev/mk/index.pug index 108c454..3155207 100644 --- a/views/nt/ev/mk/index.pug +++ b/views/nt/ev/mk/index.pug @@ -4,7 +4,7 @@ include mixins block headline +headline ol.breadcrumb(onclick="show_all_slides();", style="margin-top: .5rem; border-radius: 0;") - .h1(style="margin-bottom: 0px; color: #0e4f88; width: 100%;") Start  + .h3(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 diff --git a/views/nt/ev/mk/layout.pug b/views/nt/ev/mk/layout.pug index d81a910..0bee156 100644 --- a/views/nt/ev/mk/layout.pug +++ b/views/nt/ev/mk/layout.pug @@ -1,4 +1,5 @@ include ../../../mixins_cookies +include ../../../mixins_headline_nav doctype html html(lang='de') @@ -28,11 +29,7 @@ html(lang='de') script(src='/javascripts/bootstrap.min.js') - script. - if(JSON.parse(sessionStorage.getItem('show_as_presentation'))) - register_presentationkeys(); - else - show_all_slides(); + +body_presentation_script +cookies_html +cookies_script diff --git a/views/nt/ev/mk/mixins.pug b/views/nt/ev/mk/mixins.pug index 91b8e9f..8a5cee7 100644 --- a/views/nt/ev/mk/mixins.pug +++ b/views/nt/ev/mk/mixins.pug @@ -6,190 +6,10 @@ mixin symbol(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%;") - tr - td(style="padding: 0px;") - b - a(href="/") BibelWissen.Halieus.DE - td(style="padding: 0px; text-align: right;") - 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 - table(style="font-size: 130%; font-variant: small-caps; margin-bottom: 0px; width: 100%;") - tr - td(style="padding: 0px;") - b Einführung in das Evangelium nach Markus - td(style="padding: 0px; text-align: right;") - .dropdown - .dropdown-toggle(data-toggle="dropdown", style="display: block; background: #555; width: 40px; height: 30px; position: relative; margin-left: auto; margin-right: 0px; border-radius: 4px; ") - //- margin-right: auto; (normalerweise) - span(style="top: 5px; position: absolute; left:5px; height: 4px; width: 30px; background: #fff; border-radius: 2px; display: block; ") - span(style="top: 13px; position: absolute; left:5px; height: 4px; width: 30px; background: #fff; border-radius: 2px; display: block; ") - span(style="top: 21px; position: absolute; left:5px; height: 4px; width: 30px; background: #fff; border-radius: 2px; display: block; ") - .dropdown-menu - .dropdown-item - input.form-check-input#check_as_presentation(type="checkbox") - label.form-check-label(for="check_as_presentation") Als Präsentation - //- , onclick="event.stopPropagation();" - - script. - var check_as_presentation = sessionStorage.getItem('show_as_presentation'); - if(check_as_presentation === null) { - console.log('no "show_as_presentation" in sessionStorage; set to false') - check_as_presentation = false; - sessionStorage.setItem('show_as_presentation', false); - } - else - check_as_presentation = JSON.parse(check_as_presentation); - - console.log("show_as_presentation: ", check_as_presentation); - - $('#check_as_presentation').prop('checked', check_as_presentation); - console.log($('#check_as_presentation').prop('checked')) - - $('#check_as_presentation').change(function() { - console.log('change'); - console.log($('#check_as_presentation').prop('checked')); - sessionStorage.setItem('show_as_presentation', $('#check_as_presentation').prop('checked')); - location.reload(); - }); + +headline_template("Einführung in das Evangelium nach Markus") 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; + +navigation_auto_template(gliederung, current, "#0e4f88") 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} - - 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) - li.nav-item - a.nav-link.active !{name} - else - li.nav-item - a.nav-link(href=href) !{name} - -mixin bottom_nav(active) - 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;") - +bottom_nav_item(active, "start", pathoffset+"/", "Start") - +bottom_nav_item(active, "gliederung", pathoffset+"/gliederung", "Gliederung") - -mixin bottom_gliederung(active) - +bottom_nav("gliederung") - hr(style="border-top-width: 5px; border-top-color: #a4d0fd") - .small(style="margin-top: 3px;") - ul.nav.nav-fill.nav-pills.pill-sub-1 - +bottom_nav_item(active, "index", pathoffset+"/gliederung/index", "Übersicht") - +bottom_nav_item(active, "anfang", pathoffset+"/gliederung/anfang", "Anfang ...") - +bottom_nav_item(active, "IIa_konzentr", pathoffset+"/gliederung/IIa_konzentr", "IIA – Konzentrisch") - +bottom_nav_item(active, "IIa_wegbereiter", pathoffset+"/gliederung/IIa_wegbereiter", "IIA – Wegbereiter") - +bottom_nav_item(active, "IIb_konzentr", pathoffset+"/gliederung/IIb_konzentr", "IIB – Konzentrisch") - +bottom_nav_item(active, "IIb_konzentr_ablehnung", pathoffset+"/gliederung/IIb_konzentr_ablehnung", "IIB – Konzentrisch Ablehnung") - +bottom_nav_item(active, "IIb_konzentr_sendung", pathoffset+"/gliederung/IIb_konzentr_sendung", "IIB – Konzentrisch Sendung") - +bottom_nav_item(active, "IIb_konzentr_hirte", pathoffset+"/gliederung/IIb_konzentr_hirte", "IIB – Konzentrisch Hirte") - +bottom_nav_item(active, "IIc_konzentr", pathoffset+"/gliederung/IIc_konzentr", "IIC – Konzentrisch") - +bottom_nav_item(active, "IIIa", pathoffset+"/gliederung/IIIa", "IIIA") - +bottom_nav_item(active, "IIIa_gesplittet", pathoffset+"/gliederung/IIIa_gesplittet", "IIIA – gesplittet") - +bottom_nav_item(active, "IIIa_falsch_richtig", pathoffset+"/gliederung/IIIa_falsch_richtig", "IIIA – Falsch – Richtig") - +bottom_nav_item(active, "III_sohn", pathoffset+"/gliederung/III_sohn", "III – Sohn") - +bottom_nav_item(active, "auf_dem_weg_konzentr", pathoffset+"/gliederung/auf_dem_weg_konzentr", "Auf dem Weg – Konzentrisch") - +bottom_nav_item(active, "auf_dem_weg_konzentr2", pathoffset+"/gliederung/auf_dem_weg_konzentr2", "Auf dem Weg – Konzentrisch 2") - +bottom_nav_item(active, "IIIc_tempel_frucht", pathoffset+"/gliederung/IIIc_tempel_frucht", "IIIC – Tempel – Frucht") - -mixin bottom_entstehung(active) - +bottom_nav("entstehung") - hr(style="border-top-width: 5px; border-top-color: #a4d0fd") - .small(style="margin-top: 3px;") - ul.nav.nav-fill.nav-pills.pill-sub-1 - +bottom_nav_item(active, "quellen", pathoffset+"/entstehung/quellen", "Quellen") - +bottom_nav_item(active, "gattung", pathoffset+"/entstehung/gattung", "Gattung") - +bottom_nav_item(active, "verfasser", pathoffset+"/entstehung/verfasser", "Verfasser") - +bottom_nav_item(active, "zeit", pathoffset+"/entstehung/zeit", "Zeit") - +bottom_nav_item(active, "ort", pathoffset+"/entstehung/ort", "Ort") - +bottom_nav_item(active, "adressaten", pathoffset+"/entstehung/adressaten", "Adressaten") - -mixin bottom_theologische_grundgedanken(active) - +bottom_nav("theologische_grundgedanken") - hr(style="border-top-width: 5px; border-top-color: #a4d0fd") - .small(style="margin-top: 3px;") - ul.nav.nav-fill.nav-pills.pill-sub-1 - +bottom_nav_item(active, "evangelium", pathoffset+"/theologische_grundgedanken/evangelium", "Evangelium") - +bottom_nav_item(active, "nachfolge", pathoffset+"/theologische_grundgedanken/nachfolge", "Nachfolge") - +bottom_nav_item(active, "schweigegebote", pathoffset+"/theologische_grundgedanken/schweigegebote", "Schweigegebote") - +bottom_nav_item(active, "heidenmission", pathoffset+"/theologische_grundgedanken/heidenmission", "Aufbruch zu den Heiden") - +bottom_nav_item(active, "versager_helden",pathoffset+"/theologische_grundgedanken/versager_helden", "Von Versagern und Helden") - +bottom_nav_item(active, "ende_anfang", pathoffset+"/theologische_grundgedanken/ende_anfang", "Ende ist Anfang") - +bottom_nav_item(active, "anfang_neu_gelesen",pathoffset+"/theologische_grundgedanken/anfang_neu_gelesen", "Der Anfang vom Ende her (neu) gelesen") - -mixin bottom_impulse_literatur(active) - +bottom_nav("impulse_literatur") - hr(style="border-top-width: 5px; border-top-color: #a4d0fd") - .small(style="margin-top: 3px;") - ul.nav.nav-fill.nav-pills.pill-sub-1 - +bottom_nav_item(active, "impulse", pathoffset+"/impulse_literatur/impulse", "Impulse") - +bottom_nav_item(active, "literatur", pathoffset+"/impulse_literatur/literatur", "Ausgewählte Literatur") + +bottom_autonav_template(gliederung, current, "#a4d0fd")