fixed navbar color for non logged in users

This commit is contained in:
vabene1111 2023-06-29 17:03:05 +02:00
parent d0164a6c28
commit 64534ff810

View File

@ -27,7 +27,7 @@ def theme_url(request):
@register.simple_tag
def nav_color(request):
if not request.user.is_authenticated:
return 'primary'
return 'navbar-light bg-primary'
if request.user.userpreference.nav_color.lower() in ['light', 'warning', 'info', 'success']:
return f'navbar-light bg-{request.user.userpreference.nav_color.lower()}'