diff --git a/content/static/script/cookiebar.js b/content/static/script/cookiebar.js new file mode 100644 index 000000000..4ad0cbf16 --- /dev/null +++ b/content/static/script/cookiebar.js @@ -0,0 +1,14 @@ +if (!window.localStorage.cookiebarHidden) { + var el = $("") + el.find('.close').click(function() { + window.localStorage.cookiebarHidden = true + el.removeClass('show') + setTimeout(function() { + el.remove() + }, 500) + }) + $('body').prepend(el) + setTimeout(function() { + el.addClass('show') + }, 1000) +} diff --git a/content/static/script/paywall.js b/content/static/script/paywall.js deleted file mode 100644 index c659417e0..000000000 --- a/content/static/script/paywall.js +++ /dev/null @@ -1,10 +0,0 @@ -var el = $("") -el.find('.paywall_donate').click(function() { - document.location = "unterstuetzen.html" -}) -el.find('.paywall_skip').click(function() { - el.fadeOut(300, function() { - el.remove() - }) -}) -$('body').append(el) diff --git a/content/static/style/default.css b/content/static/style/default.css index 85cb9a794..197162804 100644 --- a/content/static/style/default.css +++ b/content/static/style/default.css @@ -860,53 +860,7 @@ p.center { text-align: center; } -/* Paywall */ -.lightbox { - position: fixed; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: rgba(0, 0, 0, 0.7); -} - -.lightbox article { - margin: 4em auto; - padding: 2em; - background-color: white; - border-radius: 2em; - max-width: 30em; -} - -.lightbox h2 { - text-align: center; -} - -.lightbox p { - margin: 2em 0; -} -.lightbox .hint { - text-align: center; - font-style: italic; -} - -.lightbox button { - display: block; - width: 100%; - margin: 0.5em 0; - font-size: 120%; - color: white; - border: 1px solid black; - border-radius: 4px; - cursor: pointer; -} -.lightbox button.green { - background-color: #2a2; -} -.lightbox button.red { - background-color: #c22; -} .hidden[aria-hidden] { display: none; } @@ -930,4 +884,41 @@ h3 + div { } #paypal-button { margin: 1ex; -} \ No newline at end of file +} + +/* -- Cookiebar -- */ + +.cookiebar { + color: black; + background-color: #ffffcc; + border-bottom: 0.05rem solid black; + margin: 0; + margin-top: -1.6rem; + padding: 0.2rem 0.1rem 0.1rem 0.2rem; + transition: margin-top 0.3s ease-in; + height: 1.4rem; +} +.cookiebar.show { + margin-top: 0; + transition: margin-top 0.5s ease-out; +} +.cookiebar .close { + float: right; + cursor: pointer; + font-size: 100%; + color: #777; + margin: 0; +} +.cookiebar .close:hover { + color: #333; +} +.cookiebar h2, .cookiebar p { + display: inline; + margin: 0; + font-size: 80%; + line-height: 1rem; + font-weight: medium; +} +.cookiebar h2 { + font-size: 100%; +} diff --git a/xsl/header.xsl b/xsl/header.xsl index b5a8f3ecb..7ec6b16d7 100644 --- a/xsl/header.xsl +++ b/xsl/header.xsl @@ -63,11 +63,9 @@ - - - - - + + +