forked from TagesschuleElementa/www.tagesschule-elementa.ch
various fixes
This commit is contained in:
@@ -1,8 +1,20 @@
|
||||
$(function() {
|
||||
var $body = $('body');
|
||||
|
||||
var cookie_name = 'last_notification_update';
|
||||
var last_notification = getCookie(cookie_name);
|
||||
|
||||
var $header_button_notification = $('.header__button--notification');
|
||||
var current_notification = $header_button_notification.attr('data-updated');
|
||||
|
||||
if (last_notification !== current_notification) {
|
||||
$header_button_notification.addClass('new');
|
||||
}
|
||||
|
||||
$body.on('click', '.header__button--notification', function(event) {
|
||||
event.preventDefault();
|
||||
setCookie(cookie_name, current_notification, 90);
|
||||
$(this).removeClass('new');
|
||||
$body.toggleClass('notification_open');
|
||||
});
|
||||
|
||||
|
||||
@@ -368,9 +368,11 @@
|
||||
.header__button--notification {
|
||||
font-size: 0;
|
||||
padding-left: 0;
|
||||
.header__button__icon {
|
||||
transform-origin: 50% 30%;
|
||||
animation: ring 2s $easeOutQuad infinite;
|
||||
&.new {
|
||||
.header__button__icon {
|
||||
transform-origin: 50% 30%;
|
||||
animation: ring 2s $easeOutQuad infinite;
|
||||
}
|
||||
}
|
||||
svg {
|
||||
transform: none;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
box-shadow: 0 0 em(30px) rgba($black, 0.2);
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
transform-origin: 23% 5%;
|
||||
transform-origin: 50% 5%;
|
||||
transition: transform 0.3s $easeOutQuad, opacity 0.3s $easeOutQuad;
|
||||
&:before {
|
||||
content: '';
|
||||
@@ -18,7 +18,7 @@
|
||||
z-index: -2;
|
||||
position: absolute;
|
||||
top: em(-10px);
|
||||
right: em(187px);
|
||||
right: em(122px);
|
||||
width: em(20px);
|
||||
height: em(20px);
|
||||
transform: rotate(45deg);
|
||||
@@ -32,9 +32,9 @@
|
||||
margin-top: 46px;
|
||||
}
|
||||
@media screen and (max-width: $small_breakpoint) {
|
||||
transform-origin: 36% 5%;
|
||||
transform-origin: 58% 5%;
|
||||
&:before {
|
||||
right: em(157px);
|
||||
right: em(102px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user