From 8edb1c63695921ad65e0a3abcc04b66561f991c6 Mon Sep 17 00:00:00 2001 From: Frankie B Date: Mon, 5 Dec 2022 18:31:18 +0000 Subject: [PATCH] Light mode begone --- inc/nav.inc.php | 2 -- res/css/light.css | 82 --------------------------------------------- res/js/themeswap.js | 26 -------------- 3 files changed, 110 deletions(-) delete mode 100755 res/css/light.css delete mode 100755 res/js/themeswap.js diff --git a/inc/nav.inc.php b/inc/nav.inc.php index b541180..e75445c 100644 --- a/inc/nav.inc.php +++ b/inc/nav.inc.php @@ -1,4 +1,3 @@ -
\ No newline at end of file diff --git a/res/css/light.css b/res/css/light.css deleted file mode 100755 index f2b6f1c..0000000 --- a/res/css/light.css +++ /dev/null @@ -1,82 +0,0 @@ -/* -This stylesheet contains only colors which are -different depending on theme. All other styles have -been moved to global.css and imported below. -*/ -@import url('global.css'); - -/*html { - color-scheme: dark; -} - -div.project pre { - border: 1px solid #666666 -}*/ -body { - color: #000; - background-color: #fff; -} - -h1 { - color: #333; - font-size: 150% -} - -h2 { - color: #333; - font-size: 130% -} - -h3 { - color: #333; -} - -div.preview pre, div.project pre { - background-color: #333; - color: #fff; -} - -a { - color: #009; -} - -.header { - color: #333; - border-bottom: 1px solid #cccccc; -} - -.header .pagetree { - color: #333; - border-top: 1px solid #cccccc -} - -.header .pagetree .title { - color: #333 -} - -table td { - border: 1px solid black -} - - -table.skami { - border-color: #eeeeee -} - -table.skami .semiused { - color: #111; - background-color: #eee -} - -table.skami .unused { - color: #222; - background-color: #ddd -} -.toplinks { - border-bottom: 1px solid #cccccc -} - -.deprecated { - color: #aa0000; - border-bottom: 2px dashed #aa0000 -} diff --git a/res/js/themeswap.js b/res/js/themeswap.js deleted file mode 100755 index e619471..0000000 --- a/res/js/themeswap.js +++ /dev/null @@ -1,26 +0,0 @@ -function addStyleSheet(name, id) { - var path = '/res/css/' + name + '.css'; - var old = document.getElementById(id); - if (old && (old.href != path)) { - old.href = path; - } -} - -var otherTheme = { - 'dark': 'light', - 'light': 'dark', -}; - -var currentTheme = localStorage.getItem('theme'); - -if (!otherTheme.hasOwnProperty(currentTheme)) { - 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'); -}