Neuer Cookie-Hinweis und Präsentationssteuerung

This commit is contained in:
2020-04-18 12:19:29 +02:00
parent ba6481bca5
commit 7e7a7454f4
18 changed files with 189 additions and 54 deletions

View File

@@ -1,3 +1,5 @@
include ../../../mixins_cookies
doctype html
html(lang='de')
head
@@ -11,6 +13,9 @@ html(lang='de')
script(src='/javascripts/jquery.min.js')
script(src='/javascripts/slide-utils.js')
script(src='/javascripts/popper.min.js')
+cookies_css
body
block headline
@@ -23,10 +28,11 @@ html(lang='de')
script(src='/javascripts/bootstrap.min.js')
if(as_presentation === false)
script.
show_all_slides();
else
script.
script.
if(JSON.parse(sessionStorage.getItem('show_as_presentation')))
register_presentationkeys();
else
show_all_slides();
+cookies_html
+cookies_script

View File

@@ -18,10 +18,9 @@ html(lang='de')
script(src='/javascripts/bootstrap.min.js')
if(as_presentation === false)
script.
show_all_slides();
else
script.
script.
if(JSON.parse(sessionStorage.getItem('show_as_presentation')))
register_presentationkeys();
else
show_all_slides();

View File

@@ -1,3 +1,5 @@
include ../../../mixins_cookies
doctype html
html(lang='de')
head
@@ -12,6 +14,8 @@ html(lang='de')
script(src='/javascripts/jquery.min.js')
script(src='/javascripts/slide-utils.js')
script(src='/javascripts/popper.min.js')
+cookies_css
body
block headline
@@ -24,10 +28,11 @@ html(lang='de')
script(src='/javascripts/bootstrap.min.js')
if(as_presentation === false)
script.
show_all_slides();
else
script.
script.
if(JSON.parse(sessionStorage.getItem('show_as_presentation')))
register_presentationkeys();
else
show_all_slides();
+cookies_html
+cookies_script

View File

@@ -14,8 +14,46 @@ mixin headline
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
//- 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();
});
mixin navigation_auto(gliederung, current)
ol.breadcrumb(onclick="show_all_slides();", style="margin-top: .5rem; border-radius: 0;")

View File

@@ -1,3 +1,5 @@
include ../../../mixins_cookies
doctype html
html(lang='de')
head
@@ -11,6 +13,8 @@ html(lang='de')
script(src='/javascripts/jquery.min.js')
script(src='/javascripts/slide-utils.js')
script(src='/javascripts/popper.min.js')
+cookies_css
body
block headline
@@ -23,10 +27,11 @@ html(lang='de')
script(src='/javascripts/bootstrap.min.js')
if(as_presentation === false)
script.
show_all_slides();
else
script.
script.
if(JSON.parse(sessionStorage.getItem('show_as_presentation')))
register_presentationkeys();
else
show_all_slides();
+cookies_html
+cookies_script