diff --git a/assets/css/style.scss b/assets/css/style.scss index 0c0f695..35b6bc8 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss @@ -71,18 +71,11 @@ $colors: ( * { @include lightmode; - @media (prefers-color-scheme: light) { - @include lightmode; - } @media (prefers-color-scheme: dark) { @include darkmode; } } -.dark, .dark * { - @include darkmode; -} - /* Structure */ $break1: 620px; @@ -874,21 +867,8 @@ textarea { text-align: center; } } - .toggle { - order: 2; - &:hover { - cursor: pointer; - } - @media screen and (max-width: $break3) { - padding-bottom: 8px; - text-align: center; - } - .no-js & { - display: none; - } - } .links { - order: 3; + order: 2; a { margin-left: 15px; &:first-child { diff --git a/assets/js/theme.js b/assets/js/theme.js deleted file mode 100644 index 5408ad5..0000000 --- a/assets/js/theme.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -function toggleTheme(){ - if (localStorage && localStorage.getItem("theme") === "dark"){ - localStorage.setItem("theme", "default"); - } else if (localStorage){ - localStorage.setItem("theme", "dark"); - } - checkTheme(); -} - -function checkTheme(){ - if (localStorage && localStorage.getItem("theme") === "dark"){ - document.body.className = "body dark"; - } else if (localStorage){ - document.body.className = "body"; - } -} - -function checkToggleAllowed(){ - if(window.matchMedia("(prefers-color-scheme: dark)").matches || window.matchMedia("(prefers-color-scheme: light)").matches){ - document.getElementById("theme-toggle").remove(); - } else { - checkTheme(); - } -} - -checkToggleAllowed(); \ No newline at end of file diff --git a/i18n/de.yaml b/i18n/de.yaml index ca4d744..61685bf 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -36,10 +36,6 @@ - id: 404_text translation: "Die gesuchte Seite existiert nicht, wurde verschoben oder gelöscht." -# Toggle theme -- id: toggle_theme - translation: Theme umschalten - # Webmention Form - id: wmform_label translation: "Hast du eine Antwort hierzu veröffentlicht? Lass mich den Link wissen:" diff --git a/i18n/en.yaml b/i18n/en.yaml index 6c2241b..ea290c0 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -36,10 +36,6 @@ - id: 404_text translation: "The page you were looking for appears to have been moved, deleted or does not exist." -# Toggle theme -- id: toggle_theme - translation: Toggle theme - # Webmention Form - id: wmform_label translation: "Have you published a response to this? Let me know the link:" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index be44a42..e188155 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,11 +1,10 @@ - + {{ block "title" . }}{{ if not .IsHome }}{{ with .Title }}{{ . }} - {{end}}{{ end }}{{ .Site.Title }}{{ end }} - {{ template "_internal/opengraph.html" . }} @@ -42,7 +41,6 @@ {{ partial "footer" . }} - {{ with resources.Get "js/theme.js" | minify }}{{ end }} {{ partial "custombodyend" . }} \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index d18c7d5..24b54d1 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -7,9 +7,6 @@ {{- end }} {{- end }} -
- {{ T "toggle_theme" }} -