Skip to content

Commit

Permalink
Refine CSS to support dark mode #25
Browse files Browse the repository at this point in the history
Signed-off-by: tdruez <[email protected]>
  • Loading branch information
tdruez committed Feb 13, 2024
1 parent c573449 commit 5835d34
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h5 class="modal-title">{{ form.helper.modal_title }}</h5>
{# Only displayed on list views #}
{% if request.resolver_match.url_name|default:""|slice:"-4:" == "list" %}
<h6>Selected objects:</h6>
<ul id="object-repe-list"></ul>
<ul id="object-repe-list" style="word-break: break-word;"></ul>
<hr>
{% endif %}
{% crispy form %}
Expand Down
4 changes: 4 additions & 0 deletions dejacode/static/css/dejacode_bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,10 @@ div.awesomplete {
max-height: 50vh;
overflow-y: auto;
}
[data-bs-theme=dark] .awesomplete > ul {
background: var(--bs-black);
}

#div_id_component .awesomplete {
display: inline-block !important;
}
Expand Down
8 changes: 7 additions & 1 deletion dje/templates/object_details_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,13 @@ <h1 class="header-title text-break">
$('.toggle-details')
.tooltip({container: 'body', placement: 'top'})
.on('click', function() {
$('.extra-details').toggle();
if ($(this).data('enabled')) {
$('.extra-details').css("display", "none");
$(this).data('enabled', false);
} else {
$('.extra-details').css("display", "table-row");
$(this).data('enabled', true);
}
});

// clipboard.js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<a href="{% inject_preserved_filters 'product_portfolio:product_list' %}">{% trans "Products" %}</a>
</div>
<h1 class="header-title">
Comparison: {{ left_product }} <i class="fas fa-exchange-alt"></i> {{ right_product }}
Comparison: {{ left_product }} <i class="fas fa-exchange-alt mx-2"></i> {{ right_product }}
</h1>
</div>
</div>
Expand All @@ -31,7 +31,7 @@ <h1 class="header-title">
<div id="show-only-box" class="card bg-body-tertiary mb-3">
<div class="card-body p-2">
<strong>Show:</strong>
<div class="form-check form-check-inline">
<div class="form-check-inline">
{% for filter in action_filters %}
<label class="form-label form-check-inline mb-0">
<input type="checkbox" class="form-check-input" value="{{ filter.value }}"{% if filter.checked %} checked="checked"{% endif %}> {{ filter.value|title }} ({{ filter.count }})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@
$('.toggle-details')
.tooltip({container: 'body', placement: 'top'})
.on('click', function() {
$('.extra-details').toggle();
if ($(this).data('enabled')) {
$('.extra-details').css("display", "none");
$(this).data('enabled', false);
} else {
$('.extra-details').css("display", "table-row");
$(this).data('enabled', true);
}
});
</script>

0 comments on commit 5835d34

Please sign in to comment.