Feedparser==6.0.11
-Pillow==10.4
+Pillow==9.5.0
mutagen==1.47
sorl-thumbnail==12.10.0
--- /dev/null
+{% load l10n %}
+
+{% if banner %}
+<div class="
+ annoy-banner_{{ banner.place }}-container
+ annoy-banner-style_{{ banner.style }}
+ ">
+ <div class="
+ annoy-banner
+ annoy-banner_{{ banner.place }}
+ {% 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="image-box">
+ {% if banner.image %}
+ <img src="{{ banner.image.url }}">
+ {% endif %}
+ </div>
+
+ <div class="text-box">
+ <div class="text">
+ {{ banner.get_text|safe|linebreaks }}
+ </div>
+
+ <div class="state-box">
+ <div class="action-box">
+ {% if banner.action_label %}
+ <a class="action" href="{{ banner.url }}">
+ {{ banner.action_label }}
+ </a>
+ {% endif %}
+ </div>
+ </div>
+ </div>
+
+
+
+ </div>
+ </div>
+ </div>
+
+{% endif %}
+
'closable': True,
}
+@register.inclusion_tag('annoy/banner_top.html', takes_context=True)
+def annoy_banner_top(context):
+ banners = Banner.choice('top', request=context['request'])
+ return {
+ 'banner': banners.first(),
+ 'closable': True,
+ }
@register.inclusion_tag('annoy/banners.html', takes_context=True)
def annoy_banners(context, place):
}
-.annoy-banner_crisis-container {
+.annoy-banner_crisis-container,
+.annoy-banner_top-container {
position: sticky;
top: 0;
- height: 160px;
z-index: 10;
box-shadow: 0 0 10px black;
display: flex;
align-items:center;
cursor: pointer;
- @media screen and (min-height: 480px) {
- height: 33vh;
- top: calc(-33vh + 160px);
+ &.annoy-banner_top-container {
+ padding: 16px 0;
}
+ &.annoy-banner_crisis-container {
+ height: 160px;
+
+ @media screen and (min-height: 480px) {
+ height: 33vh;
+ top: calc(-33vh + 160px);
+ }
- @media screen and (max-width: 940px) {
- padding: 10px 0;
- height: auto;
- top: 0;
+ @media screen and (max-width: 940px) {
+ padding: 10px 0;
+ height: auto;
+ top: 0;
+ }
}
- .annoy-banner_crisis {
+
+ .annoy-banner_crisis,
+ .annoy-banner_top {
position: sticky;
top: 0;
width: 100%;
.image-box {
position: relative;
img {
- height: 159px;
+ max-height: 159px;
display: block;
@media screen and (max-width: 700px) {
- height: 120px;
+ max-height: 120px;
}
}
}
}
}
}
- &.annoy-banner-style_crisis_quiet {
+ &.annoy-banner-style_crisis_quiet,
+ &.annoy-banner_top-container {
background: black;
color: white;
.annoy-banner-inner {
{% load preview_ad from catalogue_tags %}
{% annoy_banner_crisis %}
+{% annoy_banner_top %}
{% annoy_banner_blackout %}