dynamic colours in website settings

This commit is contained in:
2025-05-26 08:52:04 +02:00
parent 3fe3037aed
commit 026b899db3
19 changed files with 617 additions and 119 deletions

View File

@@ -4,7 +4,7 @@
<div class="d-flex justify-content-between align-items-center">
<div>
<h3 class="mb-0">
<i class="fas {{ icon }} me-2" style="color:#16767b;"></i>
<i class="fas {{ icon }} me-2" style="color: var(--primary-color);"></i>
{{ title }}
</h3>
{% if description %}
@@ -16,7 +16,7 @@
{% if button_url == "#" %}
<button id="emptyTrashBtn"
class="btn {{ button_class if button_class else '' }}"
style="{{ 'background-color: #16767b; color: white;' if not button_class else '' }}{{ '; ' + button_style if button_style else '' }}">
style="{{ 'background-color: var(--primary-color); color: white;' if not button_class else '' }}{{ '; ' + button_style if button_style else '' }}">
{% if button_icon %}
<i class="fas {{ button_icon }} me-1"></i>
{% endif %}
@@ -25,7 +25,7 @@
{% else %}
<button onclick="window.location.href='{{ button_url }}'"
class="btn {{ button_class if button_class else '' }}"
style="{{ 'background-color: #16767b; color: white;' if not button_class else '' }}{{ '; ' + button_style if button_style else '' }}">
style="{{ 'background-color: var(--primary-color); color: white;' if not button_class else '' }}{{ '; ' + button_style if button_style else '' }}">
{% if button_icon %}
<i class="fas {{ button_icon }} me-1"></i>
{% endif %}

View File

@@ -16,7 +16,7 @@
{% for type in storage_by_type %}
<div class="d-flex justify-content-between align-items-center mb-2">
<div class="d-flex align-items-center">
<i class="fas fa-file me-2 icon-primary"></i>
<div class="color-indicator me-2" style="width: 12px; height: 12px; border-radius: 50%; background-color: var(--chart-{% if loop.index0 == 0 %}primary{% elif loop.index0 == 1 %}primary-light{% elif loop.index0 == 2 %}primary-lighter{% elif loop.index0 == 3 %}primary-lightest{% elif loop.index0 == 4 %}primary-pale{% elif loop.index0 == 5 %}secondary{% elif loop.index0 == 6 %}secondary-light{% elif loop.index0 == 7 %}secondary-lighter{% elif loop.index0 == 8 %}secondary-lightest{% else %}secondary-pale{% endif %});"></div>
<span class="text-muted">{{ type.extension|upper }}:</span>
</div>
<div class="fw-bold text-primary">{{ format_size(type.total_size) }}</div>

View File

@@ -14,7 +14,7 @@
{% for type in trash_by_type %}
<div class="d-flex justify-content-between align-items-center mb-2">
<div class="d-flex align-items-center">
<i class="fas fa-file me-2 icon-primary"></i>
<div class="color-indicator me-2" style="width: 12px; height: 12px; border-radius: 50%; background-color: var(--chart-{% if loop.index0 == 0 %}primary{% elif loop.index0 == 1 %}primary-light{% elif loop.index0 == 2 %}primary-lighter{% elif loop.index0 == 3 %}primary-lightest{% elif loop.index0 == 4 %}primary-pale{% elif loop.index0 == 5 %}secondary{% elif loop.index0 == 6 %}secondary-light{% elif loop.index0 == 7 %}secondary-lighter{% elif loop.index0 == 8 %}secondary-lightest{% else %}secondary-pale{% endif %});"></div>
<span class="text-muted">{{ type.extension|upper }}:</span>
</div>
<div class="fw-bold text-primary">{{ type.count }}</div>