diff --git a/mamweb/static/css/mamweb.css b/mamweb/static/css/mamweb.css index 0d699d5c..c931aee8 100644 --- a/mamweb/static/css/mamweb.css +++ b/mamweb/static/css/mamweb.css @@ -2,9 +2,16 @@ @import url("rozliseni.css"); @font-face { -font-family: 'OpenSans'; -src: url("../fonts/OpenSans/OpenSans-Regular.ttf"); -font-weight: normal; + font-family: 'OpenSans'; + src: url("../fonts/OpenSans/OpenSans-Regular.ttf"); + font-weight: normal; +} + +@font-face { + font-family: 'GhoulFace'; + src: url("../fonts/ghoul/ghoulheadline.ttf"), + url("../fonts/ghoul/ghoul.woff"); + font-weight: normal; } p { diff --git a/mamweb/static/fonts/ghoul/ghoul.ttf b/mamweb/static/fonts/ghoul/ghoul.ttf new file mode 100644 index 00000000..64bab478 Binary files /dev/null and b/mamweb/static/fonts/ghoul/ghoul.ttf differ diff --git a/mamweb/static/fonts/ghoul/ghoulheadline.ttf b/mamweb/static/fonts/ghoul/ghoulheadline.ttf new file mode 100644 index 00000000..90d4f7c1 Binary files /dev/null and b/mamweb/static/fonts/ghoul/ghoulheadline.ttf differ diff --git a/mamweb/templates/base.html b/mamweb/templates/base.html index fafce9fa..c3fe697c 100644 --- a/mamweb/templates/base.html +++ b/mamweb/templates/base.html @@ -35,6 +35,18 @@ {# script specifický pro stránku #} {% block script %}{% endblock %} + + {% if halloween == 2024 %} + + {% endif %} + diff --git a/various/context_processors.py b/various/context_processors.py index a1e4478a..331780b1 100644 --- a/various/context_processors.py +++ b/various/context_processors.py @@ -15,6 +15,19 @@ def april(req): return {'april': today.year} return {} +def halloween(req): + if 'X-Halloween' in req.headers: + try: + year = int(req.headers['X-Halloween']) + return {'halloween': year} + except: + pass # Fall-back to regular behaviour + + import datetime + today = datetime.date.today() + if today.month == 10 and today.day >= 25: + return {'halloween': today.year} + return {} def rozliseni(request): ltp = settings.LOCAL_TEST_PROD