From eebf78cdccbb816df2de85ef27d734f2a3d3cecc Mon Sep 17 00:00:00 2001 From: lilly Date: Fri, 22 Nov 2024 11:57:01 +0100 Subject: [PATCH] add messsage against discrimination to base template --- locale/de_DE/LC_MESSAGES/django.po | 16 +++++++++++++++- locale/en_US/LC_MESSAGES/django.po | 11 ++++++++++- locale/en_Uwu/LC_MESSAGES/django.po | 11 ++++++++++- locale/fr_FR/LC_MESSAGES/django.po | 11 ++++++++++- mafiasi/base/static/css/main.css | 20 ++++++++++++++++++++ mafiasi/base/static/js/politics_toast.mjs | 10 ++++++++++ mafiasi/base/templates/base.html | 10 ++++++++++ 7 files changed, 85 insertions(+), 4 deletions(-) create mode 100644 mafiasi/base/static/js/politics_toast.mjs diff --git a/locale/de_DE/LC_MESSAGES/django.po b/locale/de_DE/LC_MESSAGES/django.po index 7f7774f..149ede8 100644 --- a/locale/de_DE/LC_MESSAGES/django.po +++ b/locale/de_DE/LC_MESSAGES/django.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: Mafiasi\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-22 11:16+0100\n" +"POT-Creation-Date: 2024-11-22 11:46+0100\n" "PO-Revision-Date: 2024-09-03 23:52+0200\n" "Last-Translator: Markus Neblung \n" "Language-Team: \n" @@ -92,6 +92,20 @@ msgstr "Probleme?" msgid "This service is not run by fascists" msgstr "Dieser Dienst wird nicht von Faschist*innen betrieben" +#: mafiasi/base/templates/base.html:131 +msgid "" +"There is no place for racism, queerophobia, anti-Semitism and discrimination " +"in any form at mafiasi.de.
If you are affected, the student council and the " +"university's anti-discrimination office are there for you." +msgstr "" +"Auf mafiasi.de ist kein Platz für Rassismus, Queerfeindlichkeit, Antisemitismus " +"und Menschenfeindlichkeit in jeder Form.
Wenn du betroffen bist, ist der " +"FSR " +"sowie die " +"Antidiskriminierungsstelle der Uni für dich da." + #: mafiasi/base/templates/base/licenses.html:4 msgid "License information" msgstr "Lizenzinformationen" diff --git a/locale/en_US/LC_MESSAGES/django.po b/locale/en_US/LC_MESSAGES/django.po index 71c3bfc..fd9dd7f 100644 --- a/locale/en_US/LC_MESSAGES/django.po +++ b/locale/en_US/LC_MESSAGES/django.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Mafiasi\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-22 11:16+0100\n" +"POT-Creation-Date: 2024-11-22 11:46+0100\n" "PO-Revision-Date: 2024-01-18 22:42+0100\n" "Last-Translator: Markus Neblung \n" "Language-Team: \n" @@ -84,6 +84,15 @@ msgstr "" msgid "This service is not run by fascists" msgstr "" +#: mafiasi/base/templates/base.html:131 +msgid "" +"There is no place for racism, queerophobia, anti-Semitism and discrimination " +"in any form at mafiasi.de.
If you are affected, the student council and the " +"university's anti-discrimination office are there for you." +msgstr "" + #: mafiasi/base/templates/base/licenses.html:4 msgid "License information" msgstr "" diff --git a/locale/en_Uwu/LC_MESSAGES/django.po b/locale/en_Uwu/LC_MESSAGES/django.po index ca4e2e8..0b2100e 100644 --- a/locale/en_Uwu/LC_MESSAGES/django.po +++ b/locale/en_Uwu/LC_MESSAGES/django.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Mafiasi\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-22 11:16+0100\n" +"POT-Creation-Date: 2024-11-22 11:46+0100\n" "PO-Revision-Date: 2024-01-09 22:14+0000\n" "Last-Translator: kritzl \n" "Language-Team: \n" @@ -95,6 +95,15 @@ msgstr "Problems?" msgid "This service is not run by fascists" msgstr "This sevwis is not run by fascists! Nu-uh!" +#: mafiasi/base/templates/base.html:131 +msgid "" +"There is no place for racism, queerophobia, anti-Semitism and discrimination " +"in any form at mafiasi.de.
If you are affected, the student council and the " +"university's anti-discrimination office are there for you." +msgstr "" + #: mafiasi/base/templates/base/licenses.html:4 msgid "License information" msgstr "License information" diff --git a/locale/fr_FR/LC_MESSAGES/django.po b/locale/fr_FR/LC_MESSAGES/django.po index db1cfd4..0002139 100644 --- a/locale/fr_FR/LC_MESSAGES/django.po +++ b/locale/fr_FR/LC_MESSAGES/django.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Mafiasi\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-22 11:16+0100\n" +"POT-Creation-Date: 2024-11-22 11:46+0100\n" "PO-Revision-Date: 2024-09-03 23:54+0200\n" "Last-Translator: Markus Neblung \n" "Language-Team: \n" @@ -92,6 +92,15 @@ msgstr "Problèmes?" msgid "This service is not run by fascists" msgstr "" +#: mafiasi/base/templates/base.html:131 +msgid "" +"There is no place for racism, queerophobia, anti-Semitism and discrimination " +"in any form at mafiasi.de.
If you are affected, the student council and the " +"university's anti-discrimination office are there for you." +msgstr "" + #: mafiasi/base/templates/base/licenses.html:4 msgid "License information" msgstr "Informations sur la licence" diff --git a/mafiasi/base/static/css/main.css b/mafiasi/base/static/css/main.css index 0ca2504..3155a31 100644 --- a/mafiasi/base/static/css/main.css +++ b/mafiasi/base/static/css/main.css @@ -81,6 +81,26 @@ body { border-radius: 10px; } +#politics-toast { + position: fixed; + bottom: 1vw; + left: auto; + right: 1vw; + margin: 0; + max-width: 512px; + cursor: pointer; + user-select: none; + + border: none; + padding: 10px 16px; + background: #23527c; + color: white; + border-radius: 4px; +} +#politics-toast a { + color: var(--mafiasi-dark-btn-primary); +} + /* ------- MISC -------*/ .clickable { cursor: pointer; diff --git a/mafiasi/base/static/js/politics_toast.mjs b/mafiasi/base/static/js/politics_toast.mjs new file mode 100644 index 0000000..58a0b16 --- /dev/null +++ b/mafiasi/base/static/js/politics_toast.mjs @@ -0,0 +1,10 @@ +document.addEventListener("DOMContentLoaded", () => { + const toast = document.getElementById("politics-toast"); + + // close dialog when clicked + const close = () => toast.style.display = "none"; + toast.addEventListener("click", close); + + // alternatively, also close dialog after 20 seconds + setTimeout(close, 20 * 1000); +}) diff --git a/mafiasi/base/templates/base.html b/mafiasi/base/templates/base.html index 423b343..f44e07f 100644 --- a/mafiasi/base/templates/base.html +++ b/mafiasi/base/templates/base.html @@ -126,6 +126,15 @@

{% block ptitle %}{% endblock %}

+ + {% if request.session.specialFeature == 'winter' %} @@ -136,6 +145,7 @@

{% block ptitle %}{% endblock %}

+ {% block js %} {% endblock js %}