Skip to content

Commit

Permalink
Changed the copyright year to be shown in hex (#3842)
Browse files Browse the repository at this point in the history
Co-authored-by: bpc <[email protected]>
  • Loading branch information
BPC2004 and bpc authored Nov 18, 2024
1 parent 9559540 commit 3becdc5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions website/thaliawebsite/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
1 change: 1 addition & 0 deletions website/thaliawebsite/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
},
},
Expand Down
2 changes: 1 addition & 1 deletion website/thaliawebsite/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
<div
class="container d-flex justify-content-md-between align-items-center flex-md-row flex-column">
<div class="copyright">
<strong>Copyright {% now "Y" %} {% trans 'Study Association Thalia' %}</strong>
<strong>Copyright {{ YEAR_IN_HEX }} {% trans 'Study Association Thalia' %}</strong>
<span class="divider">&#9679;</span>
<a href="{% url 'singlepages:privacy-policy' %}">{% trans "privacy policy"|capfirst %}</a>
<span class="divider">&#9679;</span>
Expand Down

0 comments on commit 3becdc5

Please sign in to comment.