ghoul font na posledních 7 dní října 2024
This commit is contained in:
parent
133c487637
commit
592ae29d35
5 changed files with 35 additions and 3 deletions
|
@ -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 {
|
||||
|
|
BIN
mamweb/static/fonts/ghoul/ghoul.ttf
Normal file
BIN
mamweb/static/fonts/ghoul/ghoul.ttf
Normal file
Binary file not shown.
BIN
mamweb/static/fonts/ghoul/ghoulheadline.ttf
Normal file
BIN
mamweb/static/fonts/ghoul/ghoulheadline.ttf
Normal file
Binary file not shown.
|
@ -35,6 +35,18 @@
|
|||
{# script specifický pro stránku #}
|
||||
{% block script %}{% endblock %}
|
||||
|
||||
<!-- Halloween 2024 -->
|
||||
{% if halloween == 2024 %}
|
||||
<script>
|
||||
function printHalloween() {
|
||||
console.log("Halloween 2024");
|
||||
body = document.getElementsByTagName('body')[0];
|
||||
body.style.fontFamily = 'GhoulFace';
|
||||
}
|
||||
window.onload = printHalloween;
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
</head>
|
||||
<body class='{{ LOCAL_TEST_PROD }}web{% if user.is_staff %} org-logged-in{% endif %}'>
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue