This commit is contained in:
2026-02-06 08:40:59 +01:00
committed by Florian Greistorfer
parent 7d086a7a20
commit 8e1f9a738f
2 changed files with 10 additions and 13 deletions

View File

@@ -132,6 +132,8 @@ figure {
text-align: center; text-align: center;
padding: 14px 16px; padding: 14px 16px;
text-decoration: none; text-decoration: none;
height: 1.222em;
box-sizing: content-box;
} }
.navbar .navleft { .navbar .navleft {
@@ -302,12 +304,7 @@ input {
border-style: none; border-style: none;
} }
.darkmodeswitch { .darkmodeswitch a {
font-size: smaller;
height: 100%;
}
#dark-mode-switch {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@@ -316,7 +313,7 @@ input {
position: relative; position: relative;
} }
#dark-mode-switch .checkbox { .darkmodeswitch a input[type="checkbox"] {
position: absolute; position: absolute;
width: 100%; width: 100%;
margin: 0; margin: 0;
@@ -325,7 +322,7 @@ input {
z-index: 2; z-index: 2;
} }
#dark-mode-switch .knobs { .darkmodeswitch a .knobs {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@@ -334,12 +331,12 @@ input {
width: 100%; width: 100%;
} }
#dark-mode-switch .light, .darkmodeswitch a .light,
#dark-mode-switch .dark { .darkmodeswitch a .dark {
text-align: center; text-align: center;
} }
#dark-mode-switch .slider { .darkmodeswitch a .slider {
position: absolute; position: absolute;
width: calc(2em - 2px); width: calc(2em - 2px);
height: calc(2em - 2px); height: calc(2em - 2px);
@@ -351,7 +348,7 @@ input {
left: calc(50% - 1em + 1px); left: calc(50% - 1em + 1px);
} }
#dark-mode-switch .checkbox:checked+.knobs .slider { .darkmodeswitch a input[type="checkbox"]:checked+.knobs .slider {
left: calc(50% + 1em - 1px); left: calc(50% + 1em - 1px);
} }

View File

@@ -101,7 +101,7 @@
{%- endif %} {%- endif %}
{%- if darktheme %} {%- if darktheme %}
<li class="darkmodeswitch"> <li class="darkmodeswitch">
<a class="button" id="dark-mode-switch"> <a id="dark-mode-switch">
<input type="checkbox" class="checkbox" id="dark-mode-switch-check" /> <input type="checkbox" class="checkbox" id="dark-mode-switch-check" />
<div class="knobs"> <div class="knobs">
<span class="light">☀︎</span> <span class="light">☀︎</span>