mirror of
https://github.com/Ad-closeNN/blog-fuwari.git
synced 2026-05-31 01:00:04 -04:00
robin theme
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import { siteConfig } from "../config";
|
||||
|
||||
// 周日判断
|
||||
const isSunday = new Date().getDay() === 0;
|
||||
const isSunday = true;
|
||||
|
||||
// 这tm重置色
|
||||
---
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user