Set static theme color

This commit is contained in:
Hazem Krimi
2023-11-18 14:55:47 +01:00
parent 4598a12887
commit d963b389af
3 changed files with 3 additions and 6 deletions
+2 -2
View File
@@ -16,8 +16,8 @@
/* Colors */ /* Colors */
--black: #131314; --black: #131314;
--white: white; --white: white;
--crimson: #bd1839; --crimson: #BD1839;
--light-gray: #e7e7e7; --light-gray: #E7E7E7;
/* Background colors */ /* Background colors */
--dark-background: #1d1b1b; --dark-background: #1d1b1b;
-3
View File
@@ -18,9 +18,6 @@ function initTheme() {
function loadTheme() { function loadTheme() {
root.style.setProperty('--theme', theme); root.style.setProperty('--theme', theme);
document
.querySelector('meta[name="theme-color"]')
.setAttribute('content', theme === 'light' ? '#FBFBFB' : '#1D1B1B');
root.style.setProperty( root.style.setProperty(
'--background', '--background',
theme === 'light' ? 'var(--light-background)' : 'var(--dark-background)' theme === 'light' ? 'var(--light-background)' : 'var(--dark-background)'
+1 -1
View File
@@ -12,7 +12,7 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#FBFBFB" /> <meta name="theme-color" content="#BD1839" />
{{ with .OutputFormats.Get "rss" -}} {{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }} {{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }}