diff --git a/themes/gokarna/static/css/main.css b/themes/gokarna/static/css/main.css index d6e13e3..3fba361 100644 --- a/themes/gokarna/static/css/main.css +++ b/themes/gokarna/static/css/main.css @@ -98,7 +98,6 @@ html { color: white; display: inline-block; font-size: 14px; - font-weight: 700; padding: 4px 12px; } .post-tag a { diff --git a/themes/gokarna/static/js/main.js b/themes/gokarna/static/js/main.js index 0b81872..f6bd33a 100644 --- a/themes/gokarna/static/js/main.js +++ b/themes/gokarna/static/js/main.js @@ -13,7 +13,8 @@ function ready() { darkThemeCss = document.getElementById("dark-theme"); // TODO: Fetch programatically by user's system preference - const savedTheme = localStorage.getItem(THEME_PREF_STORAGE_KEY) || 'light'; + const savedTheme = localStorage.getItem(THEME_PREF_STORAGE_KEY) || + window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark': 'light'; setTheme(savedTheme); document.getElementById('dark-theme-toggle').addEventListener('click', () => { if (toggleIcon.className === THEME_TO_ICON_CLASS.dark) {