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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from aldryn_forms.utils import get_user_model
|
||||
from django.contrib import admin
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from django import forms
|
||||
from django.contrib.auth.forms import AuthenticationForm
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from cms.models.fields import PlaceholderField
|
||||
import os
|
||||
from django.contrib.auth import get_user_model
|
||||
@@ -5,7 +6,7 @@ from django.contrib.auth.models import Group
|
||||
from django.core.files.storage import default_storage
|
||||
from django.conf import settings
|
||||
from django.db import models
|
||||
from django.urls import reverse_lazy
|
||||
from django.core.urlresolvers import reverse_lazy
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from image_cropping import ImageRatioField
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
from aldryn_django.storage import S3MediaStorage
|
||||
from django.conf import settings
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
from django.conf.urls import url
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.contrib.auth.views import LoginView, LogoutView, PasswordChangeView
|
||||
from django.urls import reverse_lazy
|
||||
from django.core.urlresolvers import reverse_lazy
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
@@ -30,9 +30,9 @@ urlpatterns = [
|
||||
template_name='memberzone/change_success.html'
|
||||
), login_url=reverse_lazy('memberzone:login')), name='profile_edit_done'),
|
||||
|
||||
url(_(r'^task/(?P<pk>\d+)/$'), login_required(MemberTaskDetailView.as_view(
|
||||
url(_(r'^info/(?P<pk>\d+)/$'), login_required(MemberTaskDetailView.as_view(
|
||||
), login_url=reverse_lazy('memberzone:login')), name='task'),
|
||||
|
||||
url(_(r'^overview/$'), login_required(OverviewView.as_view(), login_url=reverse_lazy('memberzone:login')),
|
||||
url(_(r'^$'), login_required(OverviewView.as_view(), login_url=reverse_lazy('memberzone:login')),
|
||||
name='overview'),
|
||||
]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from django.shortcuts import redirect
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils import timezone
|
||||
from django.core.urlresolvers import reverse_lazy
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.views.generic import UpdateView, ListView, DetailView
|
||||
|
||||
|
||||
@@ -285,8 +285,8 @@ class Partner(CMSPlugin):
|
||||
url = models.URLField(verbose_name='URL', blank=True, null=True)
|
||||
|
||||
class Meta(CMSPlugin.Meta):
|
||||
verbose_name = 'Slider Item'
|
||||
verbose_name_plural = 'Slider Items'
|
||||
verbose_name = 'Partner'
|
||||
verbose_name_plural = 'Partner'
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
@@ -80,15 +80,6 @@
|
||||
</ul>
|
||||
|
||||
{% block header_items %}
|
||||
{% if notification %}
|
||||
<a href="#" class="header__button header__button--notification data_id_1">
|
||||
{% trans 'Aktuell' %}
|
||||
<span class="header__button__icon">
|
||||
{% include 'project/assets/bell.svg' %}
|
||||
</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<a href="#" class="header__button header__button--search data_id_2">
|
||||
{% trans 'Suche' %}
|
||||
<span class="header__button__icon">
|
||||
@@ -96,6 +87,16 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
{% if notification %}
|
||||
<a href="#" class="header__button header__button--notification data_id_1"
|
||||
data-updated="{{ notification.updated }}">
|
||||
{% trans 'Aktuell' %}
|
||||
<span class="header__button__icon">
|
||||
{% include 'project/assets/bell.svg' %}
|
||||
</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% url 'search' as search_url %}
|
||||
{% with request.get_full_path as current_url %}
|
||||
<a href="{% if search_url in current_url %}/{{ LANGUAGE_CODE }}/{% else %}{{ current_url }}{% endif %}"
|
||||
|
||||
@@ -12,5 +12,5 @@ urlpatterns = [
|
||||
TemplateView.as_view(template_name='project/newsletter/subscription.html'), kwargs={'success': True},
|
||||
name='newsletter_subscription_success'),
|
||||
|
||||
url(_(r'^memberzone/'), include('memberzone.urls', namespace='memberzone')),
|
||||
url(_(r'^portal/'), include('memberzone.urls', namespace='memberzone')),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user