robin theme

This commit is contained in:
Ad-closeNN
2025-08-13 21:36:39 +08:00
parent 6d1a9417b1
commit d114372822
5 changed files with 6 additions and 15 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
import { siteConfig } from "../config";
// 周日判断
const isSunday = new Date().getDay() === 0;
const isSunday = true;
// 这tm重置色
---
-2
View File
@@ -52,9 +52,7 @@ const isSunday = new Date().getDay() === 0;
</div>
<!-- 星期日 -->
{isSunday &&
<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=250 height=86 src="//music.163.com/outchain/player?type=2&id=2155423467&auto=0&height=66"></iframe>
}
</div>
</div>
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -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
---
+2 -9
View File
@@ -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) {