From d114372822442f151db44f786ff9d8e513a730ba Mon Sep 17 00:00:00 2001 From: Ad-closeNN <1709301095@qq.com> Date: Wed, 13 Aug 2025 21:36:39 +0800 Subject: [PATCH] robin theme --- src/components/ConfigCarrier.astro | 2 +- src/components/widget/Profile.astro | 2 -- src/layouts/Layout.astro | 2 +- src/layouts/MainGridLayout.astro | 4 ++-- src/utils/setting-utils.ts | 11 ++--------- 5 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/components/ConfigCarrier.astro b/src/components/ConfigCarrier.astro index 6ff2db2..4bfe52f 100644 --- a/src/components/ConfigCarrier.astro +++ b/src/components/ConfigCarrier.astro @@ -3,7 +3,7 @@ import { siteConfig } from "../config"; // 周日判断 -const isSunday = new Date().getDay() === 0; +const isSunday = true; // 这tm重置色 --- diff --git a/src/components/widget/Profile.astro b/src/components/widget/Profile.astro index 301b3eb..6f3da2f 100644 --- a/src/components/widget/Profile.astro +++ b/src/components/widget/Profile.astro @@ -52,9 +52,7 @@ const isSunday = new Date().getDay() === 0; - {isSunday && - } diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index e01c1a1..14410c2 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -130,7 +130,7 @@ const bannerOffset = // Load the hue from local storage const currentDay = new Date().getDay(); - const hue = currentDay === 0 ? 290 : (localStorage.getItem('hue') || configHue); + const hue = 290; //const hue = localStorage.getItem('hue') || configHue; document.documentElement.style.setProperty('--hue', hue); diff --git a/src/layouts/MainGridLayout.astro b/src/layouts/MainGridLayout.astro index bf8cf24..fbe486e 100644 --- a/src/layouts/MainGridLayout.astro +++ b/src/layouts/MainGridLayout.astro @@ -41,10 +41,10 @@ const mainPanelTop = siteConfig.banner.enable : "5.5rem"; // 周日判断 -const isSunday = new Date().getDay() === 0; +const isSunday = true // 周六判断 -const isSaturday = new Date().getDay() === 6; +const isSaturday = false --- diff --git a/src/utils/setting-utils.ts b/src/utils/setting-utils.ts index 835e20c..10924e5 100644 --- a/src/utils/setting-utils.ts +++ b/src/utils/setting-utils.ts @@ -14,14 +14,7 @@ export function getDefaultHue(): number { } export function getHue(): number { - const currentDay = new Date().getDay(); - // 去你妈的给我查日期先 - if (currentDay === 0){ - return 290; - } - // 如果不是,则返回默认值 - const stored = localStorage.getItem("hue"); - return stored ? Number.parseInt(stored) : getDefaultHue(); + return 290 } export function setHue(hue: number): void { @@ -30,7 +23,7 @@ export function setHue(hue: number): void { // } if (currentDay != 0){ - localStorage.setItem("hue", String(hue)); + // } const r = document.querySelector(":root") as HTMLElement; if (!r) {