added initial version of tandoor dark theme

This commit is contained in:
vabene1111 2023-06-26 20:43:50 +02:00
parent 5aa80746f9
commit 6c16094b42
4 changed files with 10488 additions and 0 deletions

View File

@ -331,6 +331,7 @@ class UserPreference(models.Model, PermissionModelMixin):
FLATLY = 'FLATLY' FLATLY = 'FLATLY'
SUPERHERO = 'SUPERHERO' SUPERHERO = 'SUPERHERO'
TANDOOR = 'TANDOOR' TANDOOR = 'TANDOOR'
TANDOOR_DARK = 'TANDOOR_DARK'
THEMES = ( THEMES = (
(TANDOOR, 'Tandoor'), (TANDOOR, 'Tandoor'),
@ -338,6 +339,7 @@ class UserPreference(models.Model, PermissionModelMixin):
(DARKLY, 'Darkly'), (DARKLY, 'Darkly'),
(FLATLY, 'Flatly'), (FLATLY, 'Flatly'),
(SUPERHERO, 'Superhero'), (SUPERHERO, 'Superhero'),
(TANDOOR_DARK, 'Tandoor Dark (INCOMPLETE)'),
) )
# Nav colors # Nav colors

10484
cookbook/static/themes/tandoor_dark.min.css vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -16,6 +16,7 @@ def theme_url(request):
UserPreference.DARKLY: 'themes/darkly.min.css', UserPreference.DARKLY: 'themes/darkly.min.css',
UserPreference.SUPERHERO: 'themes/superhero.min.css', UserPreference.SUPERHERO: 'themes/superhero.min.css',
UserPreference.TANDOOR: 'themes/tandoor.min.css', UserPreference.TANDOOR: 'themes/tandoor.min.css',
UserPreference.TANDOOR_DARK: 'themes/tandoor_dark.min.css',
} }
if request.user.userpreference.theme in themes: if request.user.userpreference.theme in themes:
return static(themes[request.user.userpreference.theme]) return static(themes[request.user.userpreference.theme])

View File

@ -50,6 +50,7 @@
<b-form-select-option value="DARKLY">Darkly</b-form-select-option> <b-form-select-option value="DARKLY">Darkly</b-form-select-option>
<b-form-select-option value="FLATLY">Flatly</b-form-select-option> <b-form-select-option value="FLATLY">Flatly</b-form-select-option>
<b-form-select-option value="SUPERHERO">Superhero</b-form-select-option> <b-form-select-option value="SUPERHERO">Superhero</b-form-select-option>
<b-form-select-option value="TANDOOR_DARK">Tandoor Dark (INCOMPLETE)</b-form-select-option>
</b-form-select> </b-form-select>
</b-form-group> </b-form-group>