lots of theming related changes

- upload a custom logo for your space
    - space settings can override user settings for theming
    - spaces can upload custom CSS overrides
    - allow users to disable showing the tandoor/space logo
    - allow changing navigation background color to any color desired
    - allow switching navigation text color between dark/light (different effects depending on theme)
This commit is contained in:
vabene1111
2024-01-01 22:14:01 +01:00
parent aa0d6b5a6b
commit 3d8b1d6ccb
14 changed files with 4811 additions and 825 deletions

View File

@ -60,9 +60,9 @@ admin.site.register(UserSpace, UserSpaceAdmin)
class UserPreferenceAdmin(admin.ModelAdmin):
list_display = ('name', 'theme', 'nav_color', 'default_page')
list_display = ('name', 'theme', 'default_page')
search_fields = ('user__username',)
list_filter = ('theme', 'nav_color', 'default_page',)
list_filter = ('theme', 'default_page',)
date_hierarchy = 'created_at'
filter_horizontal = ('plan_share', 'shopping_share',)
@ -75,7 +75,7 @@ admin.site.register(UserPreference, UserPreferenceAdmin)
class SearchPreferenceAdmin(admin.ModelAdmin):
list_display = ('name', 'search', 'trigram_threshold', )
list_display = ('name', 'search', 'trigram_threshold',)
search_fields = ('user__username',)
list_filter = ('search',)
@ -169,7 +169,7 @@ def delete_unattached_steps(modeladmin, request, queryset):
class StepAdmin(admin.ModelAdmin):
list_display = ('recipe_and_name', 'order', 'space')
ordering = ('recipe__name', 'name', 'space', )
ordering = ('recipe__name', 'name', 'space',)
search_fields = ('name', 'recipe__name')
actions = [delete_unattached_steps]
@ -198,7 +198,7 @@ def rebuild_index(modeladmin, request, queryset):
class RecipeAdmin(admin.ModelAdmin):
list_display = ('name', 'internal', 'created_by', 'storage', 'space')
search_fields = ('name', 'created_by__username')
ordering = ('name', 'created_by__username', )
ordering = ('name', 'created_by__username',)
list_filter = ('internal',)
date_hierarchy = 'created_at'
@ -215,7 +215,7 @@ admin.site.register(Recipe, RecipeAdmin)
class UnitAdmin(admin.ModelAdmin):
list_display = ('name', 'space')
ordering = ('name', 'space', )
ordering = ('name', 'space',)
search_fields = ('name',)