diff --git a/src/assets/atom-feed.xsl b/src/assets/atom-feed.xsl index 1892d11b..2bbc038c 100644 --- a/src/assets/atom-feed.xsl +++ b/src/assets/atom-feed.xsl @@ -23,6 +23,7 @@ xmlns:atom="http://www.w3.org/2005/Atom"> +
diff --git a/src/assets/scripts/isDarkMode.js b/src/assets/scripts/isDarkMode.js new file mode 100644 index 00000000..230fab87 --- /dev/null +++ b/src/assets/scripts/isDarkMode.js @@ -0,0 +1,10 @@ +;(function () { + const isDarkMode = () => + localStorage.theme === 'dark' || + (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches) + if (isDarkMode()) { + document.documentElement.classList.add('dark') + } else { + document.documentElement.classList.remove('dark') + } +})()