fixed #16648: created gridstack override and removed inline bug fix

This commit is contained in:
Andrew Gormley 2024-07-09 15:20:42 +01:00
parent cc3d937ea8
commit 2d122fcd3d
5 changed files with 16 additions and 16 deletions

Binary file not shown.

View File

@ -6,6 +6,7 @@
// Overrides of external libraries // Overrides of external libraries
@import 'overrides/bootstrap'; @import 'overrides/bootstrap';
@import 'overrides/gridstack';
@import 'overrides/tabler'; @import 'overrides/tabler';
@import 'overrides/tomselect'; @import 'overrides/tomselect';

View File

@ -0,0 +1,12 @@
// Altering dashboard card colors
.grid-stack {
.card-header {
// Default color of card header changes depending on theme
&.bg-default {
background: var(--tblr-bg-surface-secondary)!important;
}
a {
color: inherit!important;
}
}
}

View File

@ -66,19 +66,6 @@ table th.orderable a {
background: var(--tblr-bg-surface-secondary)!important; background: var(--tblr-bg-surface-secondary)!important;
} }
// Altering dashboard card colors
.grid-stack {
.card-header {
// Default color of card header changes depending on theme
&.bg-default {
background: var(--tblr-bg-surface-secondary)!important;
}
a {
color: inherit!important;
}
}
}
.footer .text-primary { .footer .text-primary {
color: $rich-black!important; color: $rich-black!important;
} }

View File

@ -9,14 +9,14 @@
gs-id="{{ widget.id }}" gs-id="{{ widget.id }}"
> >
<div class="card grid-stack-item-content"> <div class="card grid-stack-item-content">
<div class="card-header {% if widget.color and widget.color != 'gray' %} text-{{ widget.fg_color }} {% endif %} bg-{{ widget.color|default:'default' }} px-2 py-1 d-flex flex-row"> <div class="card-header {% if widget.color %} text-{{ widget.fg_color }} {% endif %} bg-{{ widget.color|default:'default' }} px-2 py-1 d-flex flex-row">
<a href="#" <a href="#"
hx-get="{% url 'extras:dashboardwidget_config' id=widget.id %}" hx-get="{% url 'extras:dashboardwidget_config' id=widget.id %}"
hx-target="#htmx-modal-content" hx-target="#htmx-modal-content"
data-bs-toggle="modal" data-bs-toggle="modal"
data-bs-target="#htmx-modal" data-bs-target="#htmx-modal"
> >
<i class="mdi mdi-cog {% if widget.color and widget.color != 'gray' %} text-{{ widget.fg_color }} {% endif %}"></i> <i class="mdi mdi-cog {% if widget.color %} text-{{ widget.fg_color }} {% endif %}"></i>
</a> </a>
<div class="card-title flex-fill text-center"> <div class="card-title flex-fill text-center">
{% if widget.title %} {% if widget.title %}
@ -29,7 +29,7 @@
data-bs-toggle="modal" data-bs-toggle="modal"
data-bs-target="#htmx-modal" data-bs-target="#htmx-modal"
> >
<i class="mdi mdi-close {% if widget.color and widget.color != 'gray' %} text-{{ widget.fg_color }} {% endif %}"></i> <i class="mdi mdi-close {% if widget.color %} text-{{ widget.fg_color }} {% endif %}"></i>
</a> </a>
</div> </div>
<div class="card-body p-2 pt-1 overflow-auto"> <div class="card-body p-2 pt-1 overflow-auto">