Skip to content

Commit a2f3b21

Browse files
author
Thomas Hanke
committed
small fixed to dark mode
1 parent beda52c commit a2f3b21

File tree

3 files changed

+38
-46
lines changed

3 files changed

+38
-46
lines changed

ckanext/matolabtheme/assets/dark.css

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
*/
55

66
/* Dark Mode Variable Overrides */
7-
:root {
7+
@media (prefers-color-scheme: dark) {
8+
:root {
89
--bs-white: #fafafa;
910
--bs-black: #111;
1011
--bs-gray: #7e7e7e;
@@ -46,11 +47,12 @@
4647
.text-light {
4748
color: var(--bs-body-color) !important;
4849
}
50+
.site-footer .attribution .row .col,
4951
.site-footer a,
52+
.site-footer .text-end,
5053
.site-footer .attribution p,
51-
.site-footer label {
52-
color: var(--bs-body-color) !important;
53-
}
54+
.site-footer label { color: var(--bs-body-color) !important; }
55+
5456

5557
.checkbox input[type=checkbox], .form-check-input {
5658
background-color: var(--bs-body-bg);
@@ -61,6 +63,14 @@
6163
.accordion-button, .accordion-button:not(.collapsed){
6264
background-color: var(--bs-body-color);
6365
}
64-
66+
.navbar-nav li a {
67+
color: var(--bs-body-color);
68+
}
69+
.nav-tabs .nav-link.active,
70+
.nav-tabs .nav-item.show .nav-link {
71+
color: var(--bs-body-color);
72+
}
73+
74+
}
6575
/* End of dark.css */
6676

ckanext/matolabtheme/assets/style.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,12 @@
5757
.d-light-flex { display: flex !important; }
5858
.d-light-inline-flex { display: inline-flex !important; }
5959
.d-light-none { display: none !important; }
60-
.site-footer .attribution .row .col { color: var(--bs-light); }
60+
}
61+
.site-footer .attribution .row .col,
6162
.site-footer a,
63+
.site-footer .text-end,
6264
.site-footer .attribution p,
6365
.site-footer label { color: var(--bs-light) !important; }
64-
}
6566

6667
/* Common Styles */
6768
*,

ckanext/matolabtheme/templates/header.html

Lines changed: 20 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
{% block header_site_navigation_tabs %}
3232
{% set org_type = h.default_group_type('organization') %}
3333
{% set group_type = h.default_group_type('group') %}
34-
{{ super() }}
34+
{{super()}}
3535
{% endblock %}
3636
{% endblock %}
3737
</ul>
@@ -50,46 +50,27 @@
5050
{% block header_account_container_content %}
5151
<ul class="nav navbar-nav navbar-right ms-auto" data-module="me" data-me="{{ c.userobj.id }}">
5252
{% if c.userobj %}
53-
<li class="nav-item dropdown">
54-
{% block header_account_profile %}
55-
<a href="#" class="image nav-link dropdown-toggle" title="{{ _('View profile') }}" href="#"
56-
id="navbarAccountDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false">
57-
{{ h.user_image((c.user if c and c.user else ''), size=22) }}
58-
<span class="username">{{ c.userobj.display_name }}</span>
59-
</a>
60-
<!-- {{ h.url_for('user.read', id=c.userobj.name) }} -->
61-
{% endblock %}
62-
<ul class="dropdown-menu" aria-labelledby="navbarAccountDropdownMenuLink">
63-
{% block header_account_logged %}
64-
{% if c.userobj.sysadmin %}
65-
<li>
66-
<a class="dropdown-item" href="{{ h.url_for('admin.index') }}" title="{{ _('Sysadmin settings') }}">
67-
<i class="fa fa-gavel" aria-hidden="true"></i>
68-
<span class="text">{{ _('Admin') }}</span>
69-
</a>
70-
</li>
71-
{% endif %}
72-
{% block header_dashboard %}
73-
{{ super() }}
74-
{% endblock %}
75-
{% block header_account_settings_link %}
76-
{{ super() }}
77-
{% endblock %}
78-
<li>
79-
<hr class="dropdown-divider">
80-
</li>
81-
{% block header_account_log_out_link %}
82-
{{ super() }}
83-
{% endblock %}
84-
{% endblock %}
85-
</ul>
86-
</li>
53+
<li class="nav-item dropdown">
54+
<a href="#" class="image nav-link dropdown-toggle" title="{{ _('View profile') }}" href="#"
55+
id="navbarAccountDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false">
56+
{{ h.user_image((c.user if c and c.user else ''), size=22) }}
57+
<span class="username">{{ c.userobj.display_name }}</span>
58+
</a>
59+
<ul class="dropdown-menu" aria-labelledby="navbarAccountDropdownMenuLink">
60+
{% block header_account_logged %}
61+
{{super()}}
62+
{% block header_account_profile %}
63+
{% endblock %}
64+
65+
{% endblock %}
66+
</ul>
67+
</li>
8768
{% else %}
88-
{% block header_account_notlogged %}
89-
{{super()}}
90-
{% endblock %}
69+
{% block header_account_notlogged %}
70+
{{super()}}
71+
{% endblock %}
72+
{% endif %}
9173
</ul>
92-
{% endif %}
9374
{% endblock %}
9475
</div>
9576
</div>

0 commit comments

Comments
 (0)