_paq.push(['trackEvent', 'banner', 'banner-hide', $target.attr('id')]);
});
- if (Modernizr.localstorage) {
- if (!localStorage[tag]) {
- $on.hide();
- $target.show();
- _paq.push(['trackEvent', 'banner', 'banner-show', $target.attr('id')]);
- }
+ if (!localStorage[tag]) {
+ $on.hide();
+ $target.show();
+ _paq.push(['trackEvent', 'banner', 'banner-show', $target.attr('id')]);
}
});
--- /dev/null
+{% if banner %}
+ {% if closable %}
+ <a class='annoy-banner-on annoy-banner-on_{{ banner.place }}'
+ href="{{ banner.url }}"
+ data-target="#annoy-banner-{{ banner.id }}"
+ >
+ </a>
+ {% endif %}
+ <div class="
+ annoy-banner
+ annoy-banner_{{ banner.place }}
+ annoy-banner-style_{{ banner.style }}
+ {% if banner.image %}with-image{% endif %}
+ {% if banner.smallfont %}banner-smallfont{% endif %}
+ "
+ id="annoy-banner-{{ banner.id }}"
+ style="
+ {% if banner.text_color %}color: {{ banner.text_color }};{% endif %}
+ {% if banner.background_color %}background-color: {{ banner.background_color }};{% endif %}
+ ">
+ <div class="annoy-banner-inner">
+
+ <div class="text">
+ {{ banner.get_text|safe|linebreaks }}
+ <div class="annoy-banner_actions">
+ <a class="action l-button l-button--default l-button--default--dark" href="{{ banner.url }}">
+ {{ banner.action_label }}
+ </a>
+ <a class='annoy-banner-off annoy-banner-off_{{ banner.place }} l-button l-button--default'>{{ banner.close_label|default:"x" }}</a>
+ </div>
+ </div>
+ {% if banner.image %}
+ <div class="annoy-banner_img">
+ <img src="{{ banner.image.url }}">
+ </div>
+ {% endif %}
+ </div>
+ </div>
+
+{% endif %}
'closable': PLACES.get(place, False),
}
+@register.inclusion_tag('annoy/banner_blackout.html', takes_context=True)
+def annoy_banner_blackout(context):
+ banners = Banner.choice('blackout', request=context['request'])
+ return {
+ 'banner': banners.first(),
+ 'closable': True,
+ }
+
@register.inclusion_tag('annoy/banners.html', takes_context=True)
def annoy_banners(context, place):
</div>
<div class="l-navigation__menu__book__info">
<h3>
- <a href="{{ book.get_absolute_url }}" tabindex="-1">
- <img src="{{ book.cover_clean.url }}" alt="{{ book.pretty_title }}">
- </a>
+ {% if book.cover_clean %}
+ <a href="{{ book.get_absolute_url }}" tabindex="-1">
+ <img src="{{ book.cover_clean.url }}" alt="{{ book.pretty_title }}">
+ </a>
+ {% endif %}
<a href="{{ book.get_absolute_url }}" tabindex="-1">
{% for author in book.authors %}
{{ author }}
<h3>{% trans "Prapremiera" %}</h3>
<div class="p-homepage-prapremiera__box">
<div class="p-homepage-prapremiera__box__item">
+ {% if book.cover_clean %}
<figure>
<a href="{{ book.get_absolute_url }}">
<img src="{{ book.cover_clean.url }}" alt="{{ book.pretty_title }}">
</a>
</figure>
+ {% endif %}
<div class="p-homepage-prapremiera__box__content">
<h4>
{% for author in book.authors %}
{% load static from static %}
{% load pipeline %}
{% load piwik_tags %}
-{% load annoy_banner from annoy %}
+{% load annoy %}
<html class="no-js {% if VARIANT %}{{ VARIANT }}{% endif %}">
<head>
<meta charset="utf-8">
{% tracking_code %}
</head>
<body id="{% block body-id %}reader{% endblock %}">
- {% annoy_banner 'blackout' %}
+ {% annoy_banner_blackout %}
{% annoy_banner 'top' %}
<nav id="no-menu"><ul>
<li><a href="#" id="menu-toggle-on"></a></li>
'js/contrib/jquery.cycle2.min.js',
'sponsors/js/sponsors.js',
+ 'annoy/banner.js',
'js/contrib/jquery.countdown.js', 'js/contrib/jquery.countdown-pl.js',
'js/contrib/jquery.countdown-de.js', 'js/contrib/jquery.countdown-uk.js',
--- /dev/null
+.annnoy-banner-on {
+ display: none;
+}
+
+.annoy-banner_blackout {
+ //display: flex;
+ display: none;
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ z-index: 9999;
+ background: linear-gradient(180deg, rgba(0,0,0,1) 90%, rgba(0,0, 0,.5) 100%);
+
+ .annoy-banner-inner {
+ overflow-y: auto;
+ padding: 0 0 30px 0;
+ display: flex;
+ flex-direction: column;
+ gap: 40px;
+ }
+ .annoy-banner_actions {
+ display: flex;
+ flex-direction: column;
+ gap: 40px;
+ }
+ .annoy-banner_img {
+ flex: 1;
+ text-align: center;
+ img {
+ max-height: 100%;
+ max-width: 100%;
+ }
+ }
+ .text {
+ display: flex;
+ padding: 6px 30px;
+ flex: 1;
+ gap: 40px;
+ flex-direction: column;
+ color: white;
+ p {
+ font-size: 24px;
+ }
+ }
+ .action {
+ font-size: 1.6rem !important;
+ }
+ .annoy-banner-off {
+ font-size: 1.2rem !important;
+ }
+
+ @include rwd($break-flow) {
+ .annoy-banner-inner {
+ padding: 0;
+ margin: 10vh 10vw 20vh 10vw;
+ flex-direction: row;
+ overflow-y: unset;
+
+ .text {
+ padding: 0 20px 0 0;
+ overflow-y: auto;
+ }
+ }
+ .action {
+
+ }
+ .annoy-banner-off {
+
+ }
+ }
+}
+{% load annoy %}
{% load cache %}
{% load i18n %}
{% load static %}
{% load latest_blog_posts from blog %}
{% load preview_ad from catalogue_tags %}
+{% annoy_banner_blackout %}
+
<nav class="l-navigation">
<div class="l-container">
<a href="/" class="l-navigation__logo">