fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
2954f0e
)
Add banner style.
author
Radek Czajka
<rczajka@rczajka.pl>
Fri, 6 Dec 2024 08:55:36 +0000
(09:55 +0100)
committer
Radek Czajka
<rczajka@rczajka.pl>
Fri, 6 Dec 2024 08:55:36 +0000
(09:55 +0100)
src/annoy/models.py
patch
|
blob
|
history
src/annoy/places.py
patch
|
blob
|
history
src/annoy/templates/annoy/banner_crisis.html
patch
|
blob
|
history
src/wolnelektury/static/2022/styles/layout/_annoy.scss
patch
|
blob
|
history
diff --git
a/src/annoy/models.py
b/src/annoy/models.py
index
92b8184
..
f6dd827
100644
(file)
--- 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,
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)
)
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
ca33242
..
8fa767b
100644
(file)
--- 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'),
)),
# ('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]
]
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([
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]
])
for s in p[3]
])
diff --git
a/src/annoy/templates/annoy/banner_crisis.html
b/src/annoy/templates/annoy/banner_crisis.html
index
cd39469
..
dbbb34e
100644
(file)
--- 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 %}
{% load time_tags %}
{% if banner %}
-<div class="annoy-banner_crisis-container">
+<div class="
+ annoy-banner_crisis-container
+ annoy-banner-style_{{ banner.style }}
+ ">
<div class="
annoy-banner
annoy-banner_{{ banner.place }}
<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 %}
"
{% if banner.image %}with-image{% endif %}
{% if banner.smallfont %}banner-smallfont{% endif %}
"
diff --git
a/src/wolnelektury/static/2022/styles/layout/_annoy.scss
b/src/wolnelektury/static/2022/styles/layout/_annoy.scss
index
2415250
..
9ff6a0d
100644
(file)
--- a/
src/wolnelektury/static/2022/styles/layout/_annoy.scss
+++ b/
src/wolnelektury/static/2022/styles/layout/_annoy.scss
@@
-116,7
+116,7
@@
.image-box {
position: relative;
img {
.image-box {
position: relative;
img {
- height: 1
60
px;
+ height: 1
59
px;
display: block;
@media screen and (max-width: 700px) {
display: block;
@media screen and (max-width: 700px) {
@@
-186,4
+186,22
@@
}
}
}
}
}
}
+ &.annoy-banner-style_crisis_quiet {
+ background: black;
+ color: white;
+ .annoy-banner-inner {
+ align-items: center;
+
+ .text-box {
+ .text {
+ background: none;
+ padding: 0;
+ border: none;
+ a {
+ color: #ffd430;
+ }
+ }
+ }
+ }
+ }
}
}