From ed8433b0eed54dc394070a990a19274f11a2b14a Mon Sep 17 00:00:00 2001 From: kritzl Date: Mon, 1 Apr 2024 02:46:17 +0200 Subject: [PATCH] fix darkmode --- locale/de_DE/LC_MESSAGES/django.po | 6 +- locale/en_US/LC_MESSAGES/django.po | 6 +- locale/en_Uwu/LC_MESSAGES/django.po | 6 +- locale/fr_FR/LC_MESSAGES/django.po | 6 +- .../templates/dashboard/mafiasi_purple.html | 60 +++++++++++-------- 5 files changed, 46 insertions(+), 38 deletions(-) diff --git a/locale/de_DE/LC_MESSAGES/django.po b/locale/de_DE/LC_MESSAGES/django.po index 5baad0e..d9d737d 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-04-01 02:42+0200\n" +"POT-Creation-Date: 2024-04-01 02:46+0200\n" "PO-Revision-Date: 2024-01-18 22:42+0100\n" "Last-Translator: Markus Neblung \n" "Language-Team: \n" @@ -210,11 +210,11 @@ msgstr "" "Für Leute, die Mafiasi weiterhin kostenlos nutzen wollen, bieten wir Mafiasi " "ab heute mit Werbung an. Du hast die Wahl!" -#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:12 +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:13 msgid "Continue with ads" msgstr "Weiter mit Werbung" -#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:15 +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:18 msgid "Book Mafiasi Purple" msgstr "Mafiasi Purple buchen" diff --git a/locale/en_US/LC_MESSAGES/django.po b/locale/en_US/LC_MESSAGES/django.po index e60c3d1..7229ee3 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-04-01 02:42+0200\n" +"POT-Creation-Date: 2024-04-01 02:46+0200\n" "PO-Revision-Date: 2024-01-18 22:42+0100\n" "Last-Translator: Markus Neblung \n" "Language-Team: \n" @@ -191,11 +191,11 @@ msgid "" "Mafiasi with advertising from today. The choice is yours!" msgstr "" -#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:12 +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:13 msgid "Continue with ads" msgstr "" -#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:15 +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:18 msgid "Book Mafiasi Purple" msgstr "" diff --git a/locale/en_Uwu/LC_MESSAGES/django.po b/locale/en_Uwu/LC_MESSAGES/django.po index 6ee41f0..66be1c7 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-04-01 02:42+0200\n" +"POT-Creation-Date: 2024-04-01 02:46+0200\n" "PO-Revision-Date: 2024-01-09 22:14+0000\n" "Last-Translator: kritzl \n" "Language-Team: \n" @@ -205,13 +205,13 @@ msgid "" "Mafiasi with advertising from today. The choice is yours!" msgstr "" -#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:12 +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:13 #, fuzzy #| msgid "Continue" msgid "Continue with ads" msgstr "Continue" -#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:15 +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:18 msgid "Book Mafiasi Purple" msgstr "" diff --git a/locale/fr_FR/LC_MESSAGES/django.po b/locale/fr_FR/LC_MESSAGES/django.po index 144d73c..48a5624 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-04-01 02:42+0200\n" +"POT-Creation-Date: 2024-04-01 02:46+0200\n" "PO-Revision-Date: 2024-01-18 22:41+0100\n" "Last-Translator: Markus Neblung \n" "Language-Team: \n" @@ -217,11 +217,11 @@ msgstr "" "nous proposons Mafiasi avec de la publicité à partir d'aujourd'hui. A toi de " "choisir !" -#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:12 +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:13 msgid "Continue with ads" msgstr "Continuer avec les annonces" -#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:15 +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:18 msgid "Book Mafiasi Purple" msgstr "Livre Mafiasi Purple" diff --git a/mafiasi/dashboard/templates/dashboard/mafiasi_purple.html b/mafiasi/dashboard/templates/dashboard/mafiasi_purple.html index 24143e1..41421af 100644 --- a/mafiasi/dashboard/templates/dashboard/mafiasi_purple.html +++ b/mafiasi/dashboard/templates/dashboard/mafiasi_purple.html @@ -9,10 +9,14 @@ {% trans "For people who want to continue using Mafiasi for free, we are offering Mafiasi with advertising from today. The choice is yours!" %}
- +
- +
@@ -95,44 +99,46 @@ border: 4px solid var(--mafiasi-dark-purple); } - html:not[data-theme=light] .purple-container { - background: var(--mafiasi-dark-bg); - color: var(--mafiasi-dark-text-light); - border: 4px solid var(--mafiasi-dark-purple); - } - html[data-theme=dark] .purple-title { color: var(--mafiasi-dark-purple); } - html:not[data-theme=light] .purple-title { - color: var(--mafiasi-dark-purple); - } - html[data-theme=dark] .purple-content-devider { border-left: 1px solid var(--mafiasi-dark-purple); } - html:not[data-theme=light] .purple-content-devider { - border-left: 1px solid var(--mafiasi-dark-purple); - } - html[data-theme=dark] .btn-purple { background-color: var(--mafiasi-dark-purple) !important; border-color: var(--mafiasi-dark-purple) !important; } - html:not[data-theme=light] .btn-purple { - background-color: var(--mafiasi-dark-purple) !important; - border-color: var(--mafiasi-dark-purple) !important; - } - html[data-theme=dark] mark { color: var(--mafiasi-dark-purple); } - html:not[data-theme=light] mark { - color: var(--mafiasi-dark-purple); + @media (prefers-color-scheme: dark) { + html:not([data-theme=light]) .purple-container { + background: var(--mafiasi-dark-bg); + color: var(--mafiasi-dark-text-light); + border: 4px solid var(--mafiasi-dark-purple); + } + + html:not([data-theme=light]) .purple-title { + color: var(--mafiasi-dark-purple); + } + + html:not([data-theme=light]) .purple-content-devider { + border-left: 1px solid var(--mafiasi-dark-purple); + } + + html:not([data-theme=light]) .btn-purple { + background-color: var(--mafiasi-dark-purple) !important; + border-color: var(--mafiasi-dark-purple) !important; + } + + html:not([data-theme=light]) mark { + color: var(--mafiasi-dark-purple); + } } @media screen and (max-width: 500px) { @@ -151,9 +157,11 @@ border-left: none; } - html:not[data-theme=light] .purple-content-devider { - border-top: 1px solid var(--mafiasi-dark-purple); - border-left: none; + @media (prefers-color-scheme: dark) { + html:not([data-theme=light]) .purple-content-devider { + border-top: 1px solid var(--mafiasi-dark-purple); + border-left: none; + } } }