mirror of
https://github.com/hazemKrimi/personal-website.git
synced 2026-05-02 02:10:27 +00:00
Set static theme color
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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)'
|
||||||
|
|||||||
@@ -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 }}
|
||||||
|
|||||||
Reference in New Issue
Block a user