Fuckin' Cookie-Banner
This commit is contained in:
parent
fa13a3df3e
commit
50f6b0afe6
@ -1,9 +1,9 @@
|
|||||||
$(function() {
|
$(function() {
|
||||||
initDatepickerRange();
|
initDatepickerRange();
|
||||||
initAvailabilityCalendar();
|
initAvailabilityCalendar();
|
||||||
$('[data-toggle="tooltip"]').tooltip({
|
initCookieInfo();
|
||||||
placement: 'bottom'
|
initCookieAcceptButtonAction();
|
||||||
});
|
initTooltips();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -27,3 +27,28 @@ function initAvailabilityCalendar() {
|
|||||||
$cal.availabilityCalendar(unavailableDates);
|
$cal.availabilityCalendar(unavailableDates);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function initTooltips() {
|
||||||
|
$('[data-toggle="tooltip"]').tooltip({
|
||||||
|
placement: 'bottom'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function initCookieInfo() {
|
||||||
|
var $section = $('section.cookie');
|
||||||
|
var accepted = localStorage.getItem('Dein.Equipment.Cookie.Accepted');
|
||||||
|
if(accepted) {
|
||||||
|
$section.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function initCookieAcceptButtonAction() {
|
||||||
|
var $section = $('section.cookie');
|
||||||
|
var $acceptBtn = $section.find('button:first');
|
||||||
|
|
||||||
|
$acceptBtn.click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
localStorage.setItem('Dein.Equipment.Cookie.Accepted', true);
|
||||||
|
$section.remove();
|
||||||
|
});
|
||||||
|
}
|
||||||
@ -471,4 +471,4 @@ template {
|
|||||||
border-radius: 0 3px 3px 0;
|
border-radius: 0 3px 3px 0;
|
||||||
border-right: 1px solid #A33;
|
border-right: 1px solid #A33;
|
||||||
}
|
}
|
||||||
html,body{height:100%}body{font:1em "Lucida Grande",Helvetica,Arial,sans-serif}a{color:#f49a34;text-decoration:none}a:hover{text-decoration:none;color:#cecdd2;background-color:rgba(255,255,255,0.5)}a#back{display:block;position:absolute;left:5px;top:5px;line-height:1.2em;font-size:1.8em;font-weight:bold;text-align:center;background-color:rgba(255,255,255,0.1);border:1px solid #cecdd2;border-radius:3px;width:1.5em;height:1.5em;z-index:2}#stage{position:relative;width:100%;height:100%;background-image:url('/images/stage-camping-001.jpg');background-position:center center;background-repeat:no-repeat;background-size:cover}#stage .welcome{position:relative;width:100%;top:30%;color:#fff;font-size:3em;font-weight:bold;text-align:center}#stage .startLink{display:block;width:70%;margin:auto;position:relative;top:40%;border:1px solid #fff;color:#fff;font-size:1.3em;text-align:center;padding:.6em}#stage .startLink:hover{background-color:rgba(255,255,255,0.5);text-decoration:none}#items{background-color:#cecdd2}#items .item{display:block;position:relative;border-bottom:10px solid #fff}#items .item:last-child{border-bottom:0 none}#items .item:hover{text-decoration:none}#items .item:hover title{background-color:rgba(255,255,255,0.5);color:#cecdd2}#items .item:hover intro{background-color:rgba(255,255,255,0.5)}#items .item .preview{height:auto;width:100%}#items .item title{display:block;position:relative;top:0;width:100%;background-color:rgba(206,205,210,0.5);border-bottom:1px solid #fff;padding:.2em 0;color:#fff;text-align:center;font-weight:bold;font-size:1.1em}#items .item intro{display:none;position:absolute;bottom:0;width:100%;text-align:center;font-size:1em;font-weight:normal;color:#fff;background-color:rgba(206,205,210,0.5);border-top:1px solid #fff}#itemPage #stage{height:auto;border-bottom:1px solid #f49a34;margin-bottom:10px}#itemPage #details{text-align:justify;padding:0 5px}#itemPage #details p{margin-left:25px;margin-right:25px}#itemPage #details .price{text-align:center}#itemPage #details .price .value{color:#f49a34;font-size:2em}footer{margin-top:10px;border-top:1px solid #f49a34;background-color:rgba(206,205,210,0.5);text-align:center}footer a:hover{background-color:inherit}.lawthings h2{text-align:center;margin-bottom:30px}.input-daterange{flex-direction:column}.input-daterange.input-group .form-control,.input-daterange.input-group .input-group-addon{width:100%;display:block;border:1px solid #cecdd2}.input-daterange.input-group .input-group-addon{text-align:center}.input-daterange.input-group .form-control{border-radius:3px}.request{margin-top:20px}.request h5{font-size:1.2em;font-weight:bold;margin-bottom:10px}.request .datepicker table tr td.today,.request .datepicker table tr td.highlighted{background-image:none;background-color:rgba(244,154,52,0.5)}
|
html,body{height:100%}body{font:1em "Lucida Grande",Helvetica,Arial,sans-serif}a{color:#f49a34;text-decoration:none}a:hover{text-decoration:none;color:#cecdd2;background-color:rgba(255,255,255,0.5)}a#back{display:block;position:absolute;left:5px;top:5px;line-height:1.2em;font-size:1.8em;font-weight:bold;text-align:center;background-color:rgba(255,255,255,0.1);border:1px solid #cecdd2;border-radius:3px;width:1.5em;height:1.5em;z-index:2}.btn{border-radius:3px}.btn:hover{background-color:#cecdd2;border-color:#cecdd2}.btn.btn-primary{background-color:#f49a34;border-color:#f49a34}.btn.btn-primary:active{background-color:#f49a34;border-color:#f49a34}.btn.btn-primary:active:hover{background-color:#cecdd2;border-color:#cecdd2}#stage{position:relative;width:100%;height:100%;background-image:url('/images/stage-camping-001.jpg');background-position:center center;background-repeat:no-repeat;background-size:cover}#stage .welcome{position:relative;width:100%;top:30%;color:#fff;font-size:3em;font-weight:bold;text-align:center}#stage .startLink{display:block;width:70%;margin:auto;position:relative;top:40%;border:1px solid #fff;color:#fff;font-size:1.3em;text-align:center;padding:.6em}#stage .startLink:hover{background-color:rgba(255,255,255,0.5);text-decoration:none}#items{background-color:#cecdd2}#items .item{display:block;position:relative;border-bottom:10px solid #fff}#items .item:last-child{border-bottom:0 none}#items .item:hover{text-decoration:none}#items .item:hover title{background-color:rgba(255,255,255,0.5);color:#cecdd2}#items .item:hover intro{background-color:rgba(255,255,255,0.5)}#items .item .preview{height:auto;width:100%}#items .item title{display:block;position:relative;top:0;width:100%;background-color:rgba(206,205,210,0.5);border-bottom:1px solid #fff;padding:.2em 0;color:#fff;text-align:center;font-weight:bold;font-size:1.1em}#items .item intro{display:none;position:absolute;bottom:0;width:100%;text-align:center;font-size:1em;font-weight:normal;color:#fff;background-color:rgba(206,205,210,0.5);border-top:1px solid #fff}#itemPage #stage{height:auto;border-bottom:1px solid #f49a34;margin-bottom:10px}#itemPage #details{text-align:justify;padding:0 5px}#itemPage #details p{margin-left:25px;margin-right:25px}#itemPage #details .price{text-align:center}#itemPage #details .price .value{color:#f49a34;font-size:2em}footer{margin-top:10px;border-top:1px solid #f49a34;background-color:rgba(206,205,210,0.5);text-align:center}footer a:hover{background-color:inherit}section.cookie{padding:0 3px;overflow:hidden;height:0;margin-top:0;-webkit-animation:slide .5s forwards;-webkit-animation-delay:2s;animation:slide .5s forwards;animation-delay:2s}@-webkit-keyframes slide{100%{height:auto;margin-top:5px}}@keyframes slide{100%{height:auto;margin-top:5px}}section.cookie .infotext{font-size:14px;font-weight:bold;line-height:14px}.lawthings h2{text-align:center;margin-bottom:30px}.input-daterange{flex-direction:column}.input-daterange.input-group .form-control,.input-daterange.input-group .input-group-addon{width:100%;display:block;border:1px solid #cecdd2}.input-daterange.input-group .input-group-addon{text-align:center}.input-daterange.input-group .form-control{border-radius:3px}.request{margin-top:20px}.request h5{font-size:1.2em;font-weight:bold;margin-bottom:10px}.request .datepicker table tr td.today,.request .datepicker table tr td.highlighted{background-image:none;background-color:rgba(244,154,52,0.5)}
|
||||||
@ -10,7 +10,7 @@
|
|||||||
@color_grey: #cecdd2;
|
@color_grey: #cecdd2;
|
||||||
@color_orange: #f49a34;
|
@color_orange: #f49a34;
|
||||||
|
|
||||||
@radio_border_default: 3px;
|
@radius_border_default: 3px;
|
||||||
|
|
||||||
|
|
||||||
html,
|
html,
|
||||||
@ -50,6 +50,30 @@ a {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
border-radius: @radius_border_default;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: @color_grey;
|
||||||
|
border-color: @color_grey;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.btn-primary {
|
||||||
|
background-color: @color_orange;
|
||||||
|
border-color: @color_orange;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
background-color: @color_orange;
|
||||||
|
border-color: @color_orange;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: @color_grey;
|
||||||
|
border-color: @color_grey;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#stage {
|
#stage {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -188,6 +212,34 @@ footer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
&.cookie {
|
||||||
|
padding: 0 3px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
height: 0;
|
||||||
|
margin-top: 0;
|
||||||
|
-webkit-animation: slide 0.5s forwards;
|
||||||
|
-webkit-animation-delay: 2s;
|
||||||
|
animation: slide 0.5s forwards;
|
||||||
|
animation-delay: 2s;
|
||||||
|
|
||||||
|
@-webkit-keyframes slide {
|
||||||
|
100% { height: auto; margin-top: 5px; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes slide {
|
||||||
|
100% { height: auto; margin-top: 5px; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.infotext {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.lawthings {
|
.lawthings {
|
||||||
h2 {
|
h2 {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@ -215,7 +267,7 @@ footer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.form-control {
|
.form-control {
|
||||||
border-radius: @radio_border_default;
|
border-radius: @radius_border_default;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
extends layout
|
extends layout
|
||||||
|
|
||||||
block content
|
block content
|
||||||
|
|
||||||
#stage
|
#stage
|
||||||
div.welcome Willkommen auf Dein.Equipment
|
div.welcome Willkommen auf Dein.Equipment
|
||||||
a.startLink(href="#", onclick="document.getElementById('items').scrollIntoView(); return false;") Jetzt stöbern
|
a.startLink(href="#", onclick="document.getElementById('items').scrollIntoView(); return false;") Jetzt stöbern
|
||||||
|
|||||||
@ -11,6 +11,17 @@ html
|
|||||||
|
|
||||||
link(rel='stylesheet', href='/stylesheets/style.css')
|
link(rel='stylesheet', href='/stylesheets/style.css')
|
||||||
body
|
body
|
||||||
|
section.cookie
|
||||||
|
.content
|
||||||
|
.row
|
||||||
|
.col-8
|
||||||
|
span.infotext Für ein optimales Besuchererlebnis verwenden wir Cookies.
|
||||||
|
.col
|
||||||
|
form
|
||||||
|
.form-group
|
||||||
|
.input-group
|
||||||
|
button(type="submit", class="btn btn-primary", value="cookie") Verstanden
|
||||||
|
|
||||||
block content
|
block content
|
||||||
|
|
||||||
footer
|
footer
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user