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

@@ -33,6 +33,11 @@
<!-- Bootstrap 4 -->
<link id="id_main_css" href="{% theme_url request %}" rel="stylesheet">
{% if request.user.is_authenticated and request.space.custom_space_theme %}
<link id="id_custom_css" href="{% custom_theme request %}" rel="stylesheet">
{% endif %}
<link href="{% static 'css/app.min.css' %}" rel="stylesheet">
<script src="{% static 'js/jquery-3.5.1.min.js' %}"></script>
@@ -74,12 +79,12 @@
</head>
<body>
<nav class="navbar navbar-expand-lg {% nav_color request %}"
<nav class="navbar navbar-expand-lg {% nav_text_color request %}"
id="id_main_nav"
style="{% sticky_nav request %}">
style="{% sticky_nav request %}; background-color: {% nav_bg_color request %}">
{% if not request.user.userpreference.left_handed %}
{% if not request.user.is_authenticated or request.user.userpreference.theme == request.user.userpreference.TANDOOR %}
{% if not request.user.is_authenticated or request.user.userpreference.nav_show_logo %}
<a class="navbar-brand p-0 me-2 justify-content-center" href="{% base_path request 'base' %}"
aria-label="Tandoor">
<img class="brand-icon" src="{% logo_url request %}" alt="Logo">
@@ -93,7 +98,7 @@
</button>
{% if request.user.userpreference.left_handed %}
{% if not request.user.is_authenticated or request.user.userpreference.theme == request.user.userpreference.TANDOOR %}
{% if not request.user.is_authenticated or request.user.userpreference.nav_show_logo %}
<a class="navbar-brand p-0 me-2 justify-content-center" href="{% base_path request 'base' %}"
aria-label="Tandoor">
<img class="brand-icon" src="{% logo_url request %}" alt="Logo">