diff --git a/website/thaliawebsite/context_processors.py b/website/thaliawebsite/context_processors.py index 7677c145f..c614ad343 100644 --- a/website/thaliawebsite/context_processors.py +++ b/website/thaliawebsite/context_processors.py @@ -18,3 +18,8 @@ def lustrum_styling(_): <= timezone.now().date() <= timezone.datetime(2022, 4, 29).date() } + + +def year_as_hex(_): + now = timezone.now().year + return {"YEAR_IN_HEX": hex(now)} diff --git a/website/thaliawebsite/settings.py b/website/thaliawebsite/settings.py index 345f14980..979e14620 100644 --- a/website/thaliawebsite/settings.py +++ b/website/thaliawebsite/settings.py @@ -692,6 +692,7 @@ def show_toolbar(request): "announcements.context_processors.announcements", "thaliawebsite.context_processors.aprilfools", "thaliawebsite.context_processors.lustrum_styling", + "thaliawebsite.context_processors.year_as_hex", ], }, }, diff --git a/website/thaliawebsite/templates/base.html b/website/thaliawebsite/templates/base.html index 0840d957b..d2a915a35 100644 --- a/website/thaliawebsite/templates/base.html +++ b/website/thaliawebsite/templates/base.html @@ -148,7 +148,7 @@