1
0
Fork 0

Update header.html

fix build error
This commit is contained in:
Wind 2023-06-26 14:16:31 +08:00 committed by GitHub
parent e7e91a6882
commit a6fea9b4a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,7 +34,7 @@
// dark theme
const metaTheme = document.querySelector('meta[name="theme-color"]');
const lightBg = `{{ $.Scratch.Get "bg_color" }}`.replace(/"/g, '');
const lightBg = "{{ $.Scratch.Get `bg_color` }}".replace(/"/g, '');
const setDark = (isDark) => {
metaTheme.setAttribute('content', isDark ? '#000' : lightBg);
htmlClass[isDark ? 'add' : 'remove']('dark');