From: Radek Czajka Date: Fri, 6 Dec 2024 08:55:36 +0000 (+0100) Subject: Add banner style. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/4fb23ed3c3396d23a37a718fc857ecc8b36b0c7f Add banner style. --- diff --git a/src/annoy/models.py b/src/annoy/models.py index 92b8184dd..f6dd827d1 100644 --- a/src/annoy/models.py +++ b/src/annoy/models.py @@ -13,7 +13,6 @@ class Banner(models.Model): style = models.CharField( 'styl', max_length=255, blank=True, choices=STYLES, - help_text='Dotyczy blackoutu.' ) smallfont = models.BooleanField('mały font', default=False) text_color = models.CharField(max_length=10, blank=True) diff --git a/src/annoy/places.py b/src/annoy/places.py index ca3324223..8fa767bba 100644 --- a/src/annoy/places.py +++ b/src/annoy/places.py @@ -8,7 +8,10 @@ PLACE_DEFINITIONS = [ # ('centre', 'Środek ekranu'), ('upper', 'Górna połowa ekranu'), )), - ('crisis', 'Kryzysowa', False), + ('crisis', 'Kryzysowa', False, ( + ('quiet', 'Spokojny'), + ('loud', 'Ostry'), + )), ] PLACE_CHOICES = [p[:2] for p in PLACE_DEFINITIONS] @@ -23,6 +26,6 @@ STYLES = [] for p in PLACE_DEFINITIONS: if len(p) > 3: STYLES.extend([ - (f'{p[0]}_{s[0]}', s[1]) + (f'{p[0]}_{s[0]}', f'{p[1]} — {s[1]}') for s in p[3] ]) diff --git a/src/annoy/templates/annoy/banner_crisis.html b/src/annoy/templates/annoy/banner_crisis.html index cd39469fb..dbbb34e7a 100644 --- a/src/annoy/templates/annoy/banner_crisis.html +++ b/src/annoy/templates/annoy/banner_crisis.html @@ -2,11 +2,13 @@ {% load time_tags %} {% if banner %} -
+