mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
better dark mode route handling
This commit is contained in:
parent
edcdaeb9b4
commit
054683a82e
4 changed files with 4 additions and 3 deletions
File diff suppressed because one or more lines are too long
|
|
@ -234,7 +234,7 @@ class darkMode {
|
|||
body: JSON.stringify({ darkmode: isDark }),
|
||||
};
|
||||
const send = await fetch(
|
||||
`${location.origin}/darkmode`,
|
||||
document.querySelector("[data-mode-link]").getAttribute("data-mode-link"),
|
||||
data,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@
|
|||
}
|
||||
|
||||
.core-card-text-doc-link {
|
||||
@apply hover:brightness-90 cursor-pointer mt-2 underline text-primary;
|
||||
@apply hover:brightness-90 cursor-pointer mt-2 underline text-sky-500;
|
||||
}
|
||||
|
||||
.center.core-card-text {
|
||||
|
|
|
|||
1
src/ui/templates/menu.html
vendored
1
src/ui/templates/menu.html
vendored
|
|
@ -248,6 +248,7 @@
|
|||
<input {% if dark_mode == True %}checked{% endif %}
|
||||
id="darkMode"
|
||||
data-dark-toggle
|
||||
data-mode-link="{{ url_for('darkmode') }}"
|
||||
class="dark:brightness-125 hover:brightness-75 rounded-10 duration-300 ease-in-out after:rounded-circle after:shadow-2xl after:duration-300 checked:after:translate-x-5.3 h-5 mt-0.5 relative float-left w-10 cursor-pointer appearance-none border border-solid border-gray-200 bg-slate-800/10 bg-none bg-contain bg-left bg-no-repeat align-top transition-all after:absolute after:top-px after:h-4 after:w-4 after:translate-x-px after:bg-white after:content-[''] checked:border-primary checked:bg-primary checked:bg-none checked:bg-right"
|
||||
type="checkbox" />
|
||||
<label for="darkMode"
|
||||
|
|
|
|||
Loading…
Reference in a new issue