summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-05-25 21:39:47 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-05-25 21:39:47 +0200
commit0e4badb22d7666d0db3737cb3a910437b5b0bf52 (patch)
tree797536d5681305404a1ad4705f65e97cc90d3c72 /share
parenta84f8fceddef22d54a4e8718c00ab74a7eb0d492 (diff)
detail page: use average image color for background
just a test. may be reverted.
Diffstat (limited to 'share')
-rw-r--r--share/html_detail_start26
1 files changed, 1 insertions, 25 deletions
diff --git a/share/html_detail_start b/share/html_detail_start
index 2cd32ec..de0b12b 100644
--- a/share/html_detail_start
+++ b/share/html_detail_start
@@ -5,30 +5,6 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href=".data/css/main.css"/>
- <link rel="stylesheet" type="text/css" href=".data/css/light.css" id="theme"/>
- <script>
- function addStyleSheet(name, id) {
- var path = '.data/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');
- }
- </script>
+ <link rel="stylesheet" type="text/css" href=".data/css/<!-- $theme -->.css" id="theme"/>
</head>
<body>