Skip to content

Commit dd61bc1

Browse files
feat: Allow changing foreground/background colors (#352)
* feat: Allow changing foreground/background colors * feat: Extend french translation * docs: Update README.md * feat: Extend help text for unclear css variables * feat: Add help text translations * fixup! feat: Extend help text for unclear css variables Removing the default values from help text * fixup! feat: Add help text translations --------- Co-authored-by: Benjamin Mourgues <[email protected]>
1 parent 781fd78 commit dd61bc1

File tree

17 files changed

+442
-14
lines changed

17 files changed

+442
-14
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ You can add a theme you've created through the admin to this repository by [send
113113
### Add theme support to third-party libraries
114114
You can add **theme support to existing third-party libraries** using the following **CSS variables**:
115115

116+
### Body colors
117+
- `--admin-interface-body-background-color`
118+
- `--admin-interface-body-foreground-color`
119+
- `--admin-interface-body-quiet-color`
120+
- `--admin-interface-body-loud-color`
121+
116122
#### Header
117123

118124
- `--admin-interface-header-background-color`

admin_interface/admin.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@ class ThemeAdmin(admin.ModelAdmin):
7373
),
7474
},
7575
),
76+
(
77+
_("Body"),
78+
{
79+
"classes": ("wide",),
80+
"fields": (
81+
"css_body_foreground_color",
82+
"css_body_background_color",
83+
"css_body_quiet_color",
84+
"css_body_loud_color",
85+
),
86+
},
87+
),
7688
(
7789
_("Header"),
7890
{

admin_interface/locale/de/LC_MESSAGES/django.po

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2023-05-10 18:20-0500\n"
11+
"POT-Creation-Date: 2024-01-10 04:13-0600\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -38,6 +38,10 @@ msgstr "Favicon"
3838
msgid "Title"
3939
msgstr "Titel"
4040

41+
#: admin_interface/admin.py
42+
msgid "Body"
43+
msgstr ""
44+
4145
#: admin_interface/admin.py
4246
msgid "Header"
4347
msgstr "Header"
@@ -173,10 +177,36 @@ msgstr "Code"
173177
msgid "display"
174178
msgstr "Anzeige"
175179

180+
#: admin_interface/models.py
181+
msgid "Required fields, error messages"
182+
msgstr ""
183+
184+
#: admin_interface/models.py
185+
#, fuzzy
186+
#| msgid "background color"
187+
msgid "foreground color"
188+
msgstr "Hintergrundfarbe"
189+
176190
#: admin_interface/models.py
177191
msgid "background color"
178192
msgstr "Hintergrundfarbe"
179193

194+
#: admin_interface/models.py
195+
msgid "Optional fields, help text, field content"
196+
msgstr ""
197+
198+
#: admin_interface/models.py
199+
#, fuzzy
200+
#| msgid "text color"
201+
msgid "quiet color"
202+
msgstr "Textfarbe"
203+
204+
#: admin_interface/models.py
205+
#, fuzzy
206+
#| msgid "link color"
207+
msgid "loud color"
208+
msgstr "Linkfarbe"
209+
180210
#: admin_interface/models.py
181211
msgid "text color"
182212
msgstr "Textfarbe"

admin_interface/locale/es/LC_MESSAGES/django.po

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ msgid ""
1010
msgstr ""
1111
"Project-Id-Version: django-admin-interface\n"
1212
"Report-Msgid-Bugs-To: \n"
13-
"POT-Creation-Date: 2023-05-10 18:20-0500\n"
13+
"POT-Creation-Date: 2024-01-10 04:13-0600\n"
1414
"PO-Revision-Date: 2023-08-04 11:52-0300\n"
1515
"Last-Translator: Santiago Muñoz <[email protected]>\n"
1616
"Language-Team: Spanish <[email protected]>\n"
@@ -40,6 +40,10 @@ msgstr "Favicon"
4040
msgid "Title"
4141
msgstr "Título"
4242

43+
#: admin_interface/admin.py
44+
msgid "Body"
45+
msgstr ""
46+
4347
#: admin_interface/admin.py
4448
msgid "Header"
4549
msgstr "Encabezado"
@@ -174,10 +178,36 @@ msgstr "código"
174178
msgid "display"
175179
msgstr "mostrar"
176180

181+
#: admin_interface/models.py
182+
msgid "Required fields, error messages"
183+
msgstr ""
184+
185+
#: admin_interface/models.py
186+
#, fuzzy
187+
#| msgid "background color"
188+
msgid "foreground color"
189+
msgstr "color de fondo"
190+
177191
#: admin_interface/models.py
178192
msgid "background color"
179193
msgstr "color de fondo"
180194

195+
#: admin_interface/models.py
196+
msgid "Optional fields, help text, field content"
197+
msgstr ""
198+
199+
#: admin_interface/models.py
200+
#, fuzzy
201+
#| msgid "text color"
202+
msgid "quiet color"
203+
msgstr "color de texto"
204+
205+
#: admin_interface/models.py
206+
#, fuzzy
207+
#| msgid "link color"
208+
msgid "loud color"
209+
msgstr "color de enlace"
210+
181211
#: admin_interface/models.py
182212
msgid "text color"
183213
msgstr "color de texto"
@@ -236,7 +266,8 @@ msgstr "anclar posición"
236266

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

241272
#: admin_interface/models.py
242273
msgid "foldable apps"

admin_interface/locale/fa/LC_MESSAGES/django.po

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: django-admin-interface\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2023-05-10 18:20-0500\n"
11+
"POT-Creation-Date: 2024-01-10 04:13-0600\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: Amir Ajorloo <[email protected]>\n"
1414
"Language-Team: Farsi <[email protected]>\n"
@@ -37,6 +37,10 @@ msgstr "آیکون تب"
3737
msgid "Title"
3838
msgstr "عنوان"
3939

40+
#: admin_interface/admin.py
41+
msgid "Body"
42+
msgstr ""
43+
4044
#: admin_interface/admin.py
4145
msgid "Header"
4246
msgstr "هدر"
@@ -172,10 +176,36 @@ msgstr "کد"
172176
msgid "display"
173177
msgstr "نمایش"
174178

179+
#: admin_interface/models.py
180+
msgid "Required fields, error messages"
181+
msgstr ""
182+
183+
#: admin_interface/models.py
184+
#, fuzzy
185+
#| msgid "background color"
186+
msgid "foreground color"
187+
msgstr "رنگ پسزمینه"
188+
175189
#: admin_interface/models.py
176190
msgid "background color"
177191
msgstr "رنگ پسزمینه"
178192

193+
#: admin_interface/models.py
194+
msgid "Optional fields, help text, field content"
195+
msgstr ""
196+
197+
#: admin_interface/models.py
198+
#, fuzzy
199+
#| msgid "text color"
200+
msgid "quiet color"
201+
msgstr "رنگ متن"
202+
203+
#: admin_interface/models.py
204+
#, fuzzy
205+
#| msgid "link color"
206+
msgid "loud color"
207+
msgstr "رنگ لینک"
208+
179209
#: admin_interface/models.py
180210
msgid "text color"
181211
msgstr "رنگ متن"
433 Bytes
Binary file not shown.

admin_interface/locale/fr/LC_MESSAGES/django.po

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2023-05-10 18:20-0500\n"
11+
"POT-Creation-Date: 2024-01-10 10:45+0100\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -38,6 +38,10 @@ msgstr "Favicon"
3838
msgid "Title"
3939
msgstr "Titre"
4040

41+
#: admin_interface/admin.py
42+
msgid "Body"
43+
msgstr "Body"
44+
4145
#: admin_interface/admin.py
4246
msgid "Header"
4347
msgstr "Bannière"
@@ -174,10 +178,30 @@ msgstr "code"
174178
msgid "display"
175179
msgstr "affichage"
176180

181+
#: admin_interface/models.py
182+
msgid "Required fields, error messages"
183+
msgstr "Défaut: #333 (champs requis, messages d'erreur)"
184+
185+
#: admin_interface/models.py
186+
msgid "foreground color"
187+
msgstr "couleur du premier plan"
188+
177189
#: admin_interface/models.py
178190
msgid "background color"
179191
msgstr "couleur d'arrière-plan"
180192

193+
#: admin_interface/models.py
194+
msgid "Optional fields, help text, field content"
195+
msgstr "Défaut: #666 (champs optionnels, texte d'aide, contenu des champs)"
196+
197+
#: admin_interface/models.py
198+
msgid "quiet color"
199+
msgstr "couleur discrète"
200+
201+
#: admin_interface/models.py
202+
msgid "loud color"
203+
msgstr "couleur forte"
204+
181205
#: admin_interface/models.py
182206
msgid "text color"
183207
msgstr "couleur du texte"

admin_interface/locale/it/LC_MESSAGES/django.po

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgid ""
99
msgstr ""
1010
"Project-Id-Version: django-admin-interface\n"
1111
"Report-Msgid-Bugs-To: \n"
12-
"POT-Creation-Date: 2023-05-10 18:20-0500\n"
12+
"POT-Creation-Date: 2024-01-10 04:13-0600\n"
1313
"PO-Revision-Date: 2018-12-30 19:13-0500\n"
1414
"Last-Translator: Fabio Caccamo <[email protected]>\n"
1515
"Language-Team: Italian <[email protected]>\n"
@@ -39,6 +39,10 @@ msgstr "Favicon"
3939
msgid "Title"
4040
msgstr "Titolo"
4141

42+
#: admin_interface/admin.py
43+
msgid "Body"
44+
msgstr ""
45+
4246
#: admin_interface/admin.py
4347
msgid "Header"
4448
msgstr "Header"
@@ -175,10 +179,36 @@ msgstr "codice"
175179
msgid "display"
176180
msgstr "visualizzazione"
177181

182+
#: admin_interface/models.py
183+
msgid "Required fields, error messages"
184+
msgstr ""
185+
186+
#: admin_interface/models.py
187+
#, fuzzy
188+
#| msgid "background color"
189+
msgid "foreground color"
190+
msgstr "colore di sfondo"
191+
178192
#: admin_interface/models.py
179193
msgid "background color"
180194
msgstr "colore di sfondo"
181195

196+
#: admin_interface/models.py
197+
msgid "Optional fields, help text, field content"
198+
msgstr ""
199+
200+
#: admin_interface/models.py
201+
#, fuzzy
202+
#| msgid "text color"
203+
msgid "quiet color"
204+
msgstr "colore del testo"
205+
206+
#: admin_interface/models.py
207+
#, fuzzy
208+
#| msgid "link color"
209+
msgid "loud color"
210+
msgstr "colore dei link"
211+
182212
#: admin_interface/models.py
183213
msgid "text color"
184214
msgstr "colore del testo"

admin_interface/locale/pl/LC_MESSAGES/django.po

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgid ""
99
msgstr ""
1010
"Project-Id-Version: django-admin-interface\n"
1111
"Report-Msgid-Bugs-To: \n"
12-
"POT-Creation-Date: 2023-05-10 18:20-0500\n"
12+
"POT-Creation-Date: 2024-01-10 04:13-0600\n"
1313
"PO-Revision-Date: 2022-02-04 19:13-0500\n"
1414
"Last-Translator: Kamil Paduszyński <[email protected]>\n"
1515
"Language-Team: Polish <[email protected]>\n"
@@ -39,6 +39,10 @@ msgstr "Ikonka"
3939
msgid "Title"
4040
msgstr "Tytuł"
4141

42+
#: admin_interface/admin.py
43+
msgid "Body"
44+
msgstr ""
45+
4246
#: admin_interface/admin.py
4347
msgid "Header"
4448
msgstr "Nagłówek"
@@ -175,10 +179,36 @@ msgstr "kod"
175179
msgid "display"
176180
msgstr "wyświetlaj"
177181

182+
#: admin_interface/models.py
183+
msgid "Required fields, error messages"
184+
msgstr ""
185+
186+
#: admin_interface/models.py
187+
#, fuzzy
188+
#| msgid "background color"
189+
msgid "foreground color"
190+
msgstr "kolor tła"
191+
178192
#: admin_interface/models.py
179193
msgid "background color"
180194
msgstr "kolor tła"
181195

196+
#: admin_interface/models.py
197+
msgid "Optional fields, help text, field content"
198+
msgstr ""
199+
200+
#: admin_interface/models.py
201+
#, fuzzy
202+
#| msgid "text color"
203+
msgid "quiet color"
204+
msgstr "kolor tekstu"
205+
206+
#: admin_interface/models.py
207+
#, fuzzy
208+
#| msgid "link color"
209+
msgid "loud color"
210+
msgstr "kolor linku"
211+
182212
#: admin_interface/models.py
183213
msgid "text color"
184214
msgstr "kolor tekstu"

0 commit comments

Comments
 (0)