From 2539e9f0aec1a54dae2646d8a02d27d71c660966 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sat, 23 Mar 2024 15:23:26 +0100 Subject: Allow light/dark/auto rather than just light/dark for theme Replaces the theme switcher in the nav bar with a less intrusive link at the bottom. Closes #125 --- templates/layouts/default.html.ep | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'templates/layouts/default.html.ep') diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index 64550c2..472ac38 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -46,12 +46,6 @@ currentTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; } addStyleSheet(currentTheme, 'theme'); - - function toggleTheme() { - currentTheme = otherTheme[currentTheme] || 'light'; - localStorage.setItem('theme', currentTheme); - addStyleSheet(currentTheme, 'theme'); - } %= stylesheet "/static/${av}/css/material-icons.css" % if (stash('with_map')) { @@ -95,9 +89,6 @@ -
  • - invert_colors -
  • % if ($acc) { @@ -147,8 +138,17 @@ Legende +
    +
    + Farbschema: + hell + · + dunkel + · + automatisch +
    +
    -