msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2019-12-16 13:47+0100\n"
+"PO-Revision-Date: 2021-04-29 15:39+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: pl\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n"
"%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n"
"%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
-"X-Generator: Poedit 2.2.4\n"
+"X-Generator: Poedit 2.3\n"
#: annoy/models.py:11
msgid "place"
msgstr "miejsce"
#: annoy/models.py:13
+msgid "style"
+msgstr "styl"
+
+#: annoy/models.py:15
+msgid "Affects blackout."
+msgstr "Dotyczy blackoutu."
+
+#: annoy/models.py:18
msgid "action label"
msgstr "etykieta akcji"
-#: annoy/models.py:15
+#: annoy/models.py:20
msgid "If empty, whole banner will serve as a link"
msgstr "Jeśli pusta, cały banner będzie służył jako link."
-#: annoy/models.py:17
+#: annoy/models.py:22
msgid "open label"
msgstr "etykieta otwierania"
-#: annoy/models.py:18
+#: annoy/models.py:23
msgid "close label"
msgstr "etykieta zamykania"
-#: annoy/models.py:19 annoy/models.py:98
+#: annoy/models.py:24 annoy/models.py:103
msgid "text"
msgstr "tekst"
-#: annoy/models.py:20
+#: annoy/models.py:25
msgid "image"
msgstr "obraz"
-#: annoy/models.py:21
+#: annoy/models.py:26
msgid "url"
msgstr "URL"
-#: annoy/models.py:23
+#: annoy/models.py:28
msgid "priority"
msgstr "priortytet"
-#: annoy/models.py:24
+#: annoy/models.py:29
msgid "Banners with higher priority come first."
msgstr "Bannery z wyższym priorytetem mają pierwszeństwo."
-#: annoy/models.py:25
+#: annoy/models.py:30
msgid "since"
msgstr "od"
-#: annoy/models.py:26
+#: annoy/models.py:31
msgid "until"
msgstr "do"
-#: annoy/models.py:27
+#: annoy/models.py:32
msgid "show members"
msgstr "widoczny dla członków klubu"
-#: annoy/models.py:28
+#: annoy/models.py:33
msgid "staff preview"
msgstr "podgląd tylko dla zespołu"
-#: annoy/models.py:31
+#: annoy/models.py:36
msgid "banner"
msgstr "banner"
-#: annoy/models.py:32
+#: annoy/models.py:37
msgid "banners"
msgstr "bannery"
-#: annoy/models.py:70
+#: annoy/models.py:75
msgid "pararaphs"
msgstr "akapity"
-#: annoy/models.py:74
+#: annoy/models.py:79
msgid "dynamic insert"
msgstr "dynamiczna wstawka"
-#: annoy/models.py:75
+#: annoy/models.py:80
msgid "dynamic inserts"
msgstr "dynamiczne wstawki"
#: annoy/places.py:8
msgid "Blackout"
msgstr "Blackout"
+
+#: annoy/places.py:9
+msgid "Full screen"
+msgstr "Cały ekran"
+
+#: annoy/places.py:11
+msgid "Upper half of screen"
+msgstr "Górna połowa ekranu"
--- /dev/null
+# Generated by Django 2.2.19 on 2021-04-29 12:58
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('annoy', '0008_dynamictextinserttext_own_colors'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='banner',
+ name='style',
+ field=models.CharField(blank=True, choices=[('blackout_full', 'Full screen'), ('blackout_centre', 'Centre of screen'), ('blackout_upper', 'Upper half of screen')], help_text='Affects blackout.', max_length=255, verbose_name='style'),
+ ),
+ ]
from django.template import Context, Template
from django.utils.translation import ugettext_lazy as _
from django.utils.timezone import now
-from .places import PLACES, PLACE_CHOICES
+from .places import PLACES, PLACE_CHOICES, STYLES
class Banner(models.Model):
place = models.SlugField(_('place'), choices=PLACE_CHOICES)
+ style = models.CharField(
+ _('style'), max_length=255, blank=True,
+ choices=STYLES,
+ help_text=_('Affects blackout.')
+ )
action_label = models.CharField(
_('action label'),
max_length=255, blank=True,
('book-page', _('Book page'), False),
('book-text-intermission', _('Book text intermission'), False),
('book-fragment-list', _('Next to list of book fragments.'), False),
- ('blackout', _('Blackout'), True),
+ ('blackout', _('Blackout'), True, (
+ ('full', _('Full screen')),
+# ('centre', _('Centre of screen')),
+ ('upper', _('Upper half of screen')),
+ )),
]
PLACE_CHOICES = [p[:2] for p in PLACE_DEFINITIONS]
p[0]: p[2]
for p in PLACE_DEFINITIONS
}
+
+
+STYLES = []
+for p in PLACE_DEFINITIONS:
+ if len(p) > 3:
+ STYLES.extend([
+ (f'{p[0]}_{s[0]}', s[1])
+ for s in p[3]
+ ])
font-size: 16pt;
line-height: 26pt;
padding: 0;
+ overflow: hidden;
.annoy-banner-inner {
padding: 0 40% 0 15%;
overflow-y: scroll;
padding-top: 20vh;
padding-bottom: 2em;
- width: 101vw;
+ width: 101%;
box-sizing: border-box;
}
}
}
+ &.annoy-banner-style_blackout_centre {
+ background: rgba(0,0,0,.5);
+
+ .annoy-banner-inner {
+ background: black;
+ position: absolute;
+ top: 14%;
+ left: 14%;
+ right: 14%;
+ bottom: 14%;
+ width: auto;
+ height: auto;
+ border: 2px solid white;
+ overflow-y: auto;
+ }
+
+ }
+ @media screen and (min-height: 500px) {
+ &.annoy-banner-style_blackout_upper {
+ background: rgba(0,0,0,.5);
+
+ .annoy-banner-inner {
+ background: black;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 50%;
+ width: auto;
+ height: auto;
+ border-bottom: 2px solid white;
+ overflow-y: auto;
+
+ .action {
+ bottom: 20vh;
+ }
+ }
+
+ .annoy-banner-off {
+ bottom: 60vh;
+ }
+ }
+ }
}
+
+
.annoy-banner-on_blackout {
position: fixed;
z-index: 9999;
{{ banner.open_label }}
</a>
{% endif %}
- <div class="annoy-banner annoy-banner_{{ banner.place }}{% if banner.image %} with-image{% endif %}" id="annoy-banner-{{ banner.id }}">
+ <div class="annoy-banner annoy-banner_{{ banner.place }} annoy-banner-style_{{ banner.style }}{% if banner.image %} with-image{% endif %}" id="annoy-banner-{{ banner.id }}">
{% if not banner.action_label %}
<a href="{{ banner.url }}">
{% endif %}