Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow changing background color #404

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ You can add a theme you've created through the admin to this repository by [send
### Add theme support to third-party libraries
You can add **theme support to existing third-party libraries** using the following **CSS variables**:

### Body colors
- `--admin-interface-body-background-color`
- `--admin-interface-body-foreground-color`
- `--admin-interface-body-quiet-color`
- `--admin-interface-body-loud-color`

#### Header

- `--admin-interface-header-background-color`
Expand Down
12 changes: 12 additions & 0 deletions admin_interface/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ class ThemeAdmin(admin.ModelAdmin):
),
},
),
(
_("Body"),
{
"classes": ("wide",),
"fields": (
"css_body_foreground_color",
"css_body_background_color",
"css_body_quiet_color",
"css_body_loud_color",
),
},
),
(
_("Header"),
{
Expand Down
32 changes: 31 additions & 1 deletion admin_interface/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-10 18:20-0500\n"
"POT-Creation-Date: 2024-01-10 04:13-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -38,6 +38,10 @@ msgstr "Favicon"
msgid "Title"
msgstr "Titel"

#: admin_interface/admin.py
msgid "Body"
msgstr ""

#: admin_interface/admin.py
msgid "Header"
msgstr "Header"
Expand Down Expand Up @@ -173,10 +177,36 @@ msgstr "Code"
msgid "display"
msgstr "Anzeige"

#: admin_interface/models.py
msgid "Required fields, error messages"
msgstr ""

#: admin_interface/models.py
#, fuzzy
#| msgid "background color"
msgid "foreground color"
msgstr "Hintergrundfarbe"

#: admin_interface/models.py
msgid "background color"
msgstr "Hintergrundfarbe"

#: admin_interface/models.py
msgid "Optional fields, help text, field content"
msgstr ""

#: admin_interface/models.py
#, fuzzy
#| msgid "text color"
msgid "quiet color"
msgstr "Textfarbe"

#: admin_interface/models.py
#, fuzzy
#| msgid "link color"
msgid "loud color"
msgstr "Linkfarbe"

#: admin_interface/models.py
msgid "text color"
msgstr "Textfarbe"
Expand Down
35 changes: 33 additions & 2 deletions admin_interface/locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: django-admin-interface\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-10 18:20-0500\n"
"POT-Creation-Date: 2024-01-10 04:13-0600\n"
"PO-Revision-Date: 2023-08-04 11:52-0300\n"
"Last-Translator: Santiago Muñoz <smunoz@mythologylabs.com.uy>\n"
"Language-Team: Spanish <dev@softbutterfly.io>\n"
Expand Down Expand Up @@ -40,6 +40,10 @@ msgstr "Favicon"
msgid "Title"
msgstr "Título"

#: admin_interface/admin.py
msgid "Body"
msgstr ""

#: admin_interface/admin.py
msgid "Header"
msgstr "Encabezado"
Expand Down Expand Up @@ -174,10 +178,36 @@ msgstr "código"
msgid "display"
msgstr "mostrar"

#: admin_interface/models.py
msgid "Required fields, error messages"
msgstr ""

#: admin_interface/models.py
#, fuzzy
#| msgid "background color"
msgid "foreground color"
msgstr "color de fondo"

#: admin_interface/models.py
msgid "background color"
msgstr "color de fondo"

#: admin_interface/models.py
msgid "Optional fields, help text, field content"
msgstr ""

#: admin_interface/models.py
#, fuzzy
#| msgid "text color"
msgid "quiet color"
msgstr "color de texto"

#: admin_interface/models.py
#, fuzzy
#| msgid "link color"
msgid "loud color"
msgstr "color de enlace"

#: admin_interface/models.py
msgid "text color"
msgstr "color de texto"
Expand Down Expand Up @@ -236,7 +266,8 @@ msgstr "anclar posición"

#: admin_interface/models.py
msgid "quick remove links for active filters at top of sidebar"
msgstr "remover enlaces para filtros activos en la parte superior de la barra lateral"
msgstr ""
"remover enlaces para filtros activos en la parte superior de la barra lateral"

#: admin_interface/models.py
msgid "foldable apps"
Expand Down
32 changes: 31 additions & 1 deletion admin_interface/locale/fa/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: django-admin-interface\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-10 18:20-0500\n"
"POT-Creation-Date: 2024-01-10 04:13-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Amir Ajorloo <amirajorloo@gmail.com>\n"
"Language-Team: Farsi <LL@li.org>\n"
Expand Down Expand Up @@ -37,6 +37,10 @@ msgstr "آیکون تب"
msgid "Title"
msgstr "عنوان"

#: admin_interface/admin.py
msgid "Body"
msgstr ""

#: admin_interface/admin.py
msgid "Header"
msgstr "هدر"
Expand Down Expand Up @@ -172,10 +176,36 @@ msgstr "کد"
msgid "display"
msgstr "نمایش"

#: admin_interface/models.py
msgid "Required fields, error messages"
msgstr ""

#: admin_interface/models.py
#, fuzzy
#| msgid "background color"
msgid "foreground color"
msgstr "رنگ پسزمینه"

#: admin_interface/models.py
msgid "background color"
msgstr "رنگ پسزمینه"

#: admin_interface/models.py
msgid "Optional fields, help text, field content"
msgstr ""

#: admin_interface/models.py
#, fuzzy
#| msgid "text color"
msgid "quiet color"
msgstr "رنگ متن"

#: admin_interface/models.py
#, fuzzy
#| msgid "link color"
msgid "loud color"
msgstr "رنگ لینک"

#: admin_interface/models.py
msgid "text color"
msgstr "رنگ متن"
Expand Down
Binary file modified admin_interface/locale/fr/LC_MESSAGES/django.mo
Binary file not shown.
26 changes: 25 additions & 1 deletion admin_interface/locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-10 18:20-0500\n"
"POT-Creation-Date: 2024-01-10 10:45+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -38,6 +38,10 @@ msgstr "Favicon"
msgid "Title"
msgstr "Titre"

#: admin_interface/admin.py
msgid "Body"
msgstr "Corps"

#: admin_interface/admin.py
msgid "Header"
msgstr "Bannière"
Expand Down Expand Up @@ -174,10 +178,30 @@ msgstr "code"
msgid "display"
msgstr "affichage"

#: admin_interface/models.py
msgid "Required fields, error messages"
msgstr "Champs requis, messages d'erreur"

#: admin_interface/models.py
msgid "foreground color"
msgstr "couleur du premier plan"

#: admin_interface/models.py
msgid "background color"
msgstr "couleur d'arrière-plan"

#: admin_interface/models.py
msgid "Optional fields, help text, field content"
msgstr "Défaut: #666 (champs optionnels, texte d'aide, contenu des champs)"

#: admin_interface/models.py
msgid "quiet color"
msgstr "couleur discrète"

#: admin_interface/models.py
msgid "loud color"
msgstr "couleur forte"

#: admin_interface/models.py
msgid "text color"
msgstr "couleur du texte"
Expand Down
32 changes: 31 additions & 1 deletion admin_interface/locale/it/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: django-admin-interface\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-10 18:20-0500\n"
"POT-Creation-Date: 2024-01-10 04:13-0600\n"
"PO-Revision-Date: 2018-12-30 19:13-0500\n"
"Last-Translator: Fabio Caccamo <fabio.caccamo@gmail.com>\n"
"Language-Team: Italian <LL@li.org>\n"
Expand Down Expand Up @@ -39,6 +39,10 @@ msgstr "Favicon"
msgid "Title"
msgstr "Titolo"

#: admin_interface/admin.py
msgid "Body"
msgstr ""

#: admin_interface/admin.py
msgid "Header"
msgstr "Header"
Expand Down Expand Up @@ -175,10 +179,36 @@ msgstr "codice"
msgid "display"
msgstr "visualizzazione"

#: admin_interface/models.py
msgid "Required fields, error messages"
msgstr ""

#: admin_interface/models.py
#, fuzzy
#| msgid "background color"
msgid "foreground color"
msgstr "colore di sfondo"

#: admin_interface/models.py
msgid "background color"
msgstr "colore di sfondo"

#: admin_interface/models.py
msgid "Optional fields, help text, field content"
msgstr ""

#: admin_interface/models.py
#, fuzzy
#| msgid "text color"
msgid "quiet color"
msgstr "colore del testo"

#: admin_interface/models.py
#, fuzzy
#| msgid "link color"
msgid "loud color"
msgstr "colore dei link"

#: admin_interface/models.py
msgid "text color"
msgstr "colore del testo"
Expand Down
32 changes: 31 additions & 1 deletion admin_interface/locale/pl/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: django-admin-interface\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-10 18:20-0500\n"
"POT-Creation-Date: 2024-01-10 04:13-0600\n"
"PO-Revision-Date: 2022-02-04 19:13-0500\n"
"Last-Translator: Kamil Paduszyński <kpaduszy@gmail.com>\n"
"Language-Team: Polish <LL@li.org>\n"
Expand Down Expand Up @@ -39,6 +39,10 @@ msgstr "Ikonka"
msgid "Title"
msgstr "Tytuł"

#: admin_interface/admin.py
msgid "Body"
msgstr ""

#: admin_interface/admin.py
msgid "Header"
msgstr "Nagłówek"
Expand Down Expand Up @@ -175,10 +179,36 @@ msgstr "kod"
msgid "display"
msgstr "wyświetlaj"

#: admin_interface/models.py
msgid "Required fields, error messages"
msgstr ""

#: admin_interface/models.py
#, fuzzy
#| msgid "background color"
msgid "foreground color"
msgstr "kolor tła"

#: admin_interface/models.py
msgid "background color"
msgstr "kolor tła"

#: admin_interface/models.py
msgid "Optional fields, help text, field content"
msgstr ""

#: admin_interface/models.py
#, fuzzy
#| msgid "text color"
msgid "quiet color"
msgstr "kolor tekstu"

#: admin_interface/models.py
#, fuzzy
#| msgid "link color"
msgid "loud color"
msgstr "kolor linku"

#: admin_interface/models.py
msgid "text color"
msgstr "kolor tekstu"
Expand Down
Loading