1
0
Fork 0

update title url

This commit is contained in:
nanxiaobei 2023-06-30 15:18:53 +08:00
parent bc9c24403f
commit 0fdcdf371b

View file

@ -2,7 +2,7 @@
<div class="relative z-50 mr-auto flex items-center"> <div class="relative z-50 mr-auto flex items-center">
<a <a
class="-translate-x-[1px] -translate-y-[1px] text-2xl font-semibold" class="-translate-x-[1px] -translate-y-[1px] text-2xl font-semibold"
href="{{ `/` | absURL }}" href="{{ `` | absURL }}"
>{{ site.Title }}</a >{{ site.Title }}</a
> >
<div <div
@ -34,7 +34,7 @@
// dark theme // dark theme
const metaTheme = document.querySelector('meta[name="theme-color"]'); 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) => { const setDark = (isDark) => {
metaTheme.setAttribute('content', isDark ? '#000' : lightBg); metaTheme.setAttribute('content', isDark ? '#000' : lightBg);
htmlClass[isDark ? 'add' : 'remove']('dark'); htmlClass[isDark ? 'add' : 'remove']('dark');