From f9ccb0ca71d61e4392f922d8de135b2e9285b967 Mon Sep 17 00:00:00 2001
From: Ad-closeNN <1709301095@qq.com>
Date: Fri, 15 Aug 2025 23:17:48 +0800
Subject: [PATCH] =?UTF-8?q?feat(config):=20=E5=8A=A0=E5=85=A5=20cache:=20n?=
=?UTF-8?q?o-cache?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
2. feat(config): color-theme 支持在星期日自动更改为知更鸟颜色 #9e8eef
3. style(background): 关闭 background 功能
---
netlify.toml | 4 ++++
src/config.ts | 2 +-
src/layouts/Layout.astro | 12 +++++++++++-
3 files changed, 16 insertions(+), 2 deletions(-)
create mode 100644 netlify.toml
diff --git a/netlify.toml b/netlify.toml
new file mode 100644
index 0000000..af35f66
--- /dev/null
+++ b/netlify.toml
@@ -0,0 +1,4 @@
+[[headers]]
+ for = "/*"
+ [headers.values]
+ cache-control = "no-cache"
\ No newline at end of file
diff --git a/src/config.ts b/src/config.ts
index 28ab569..11edcf9 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -27,7 +27,7 @@ export const siteConfig: SiteConfig = {
},
},
background: {
- enable: true, // Enable background image
+ enable: false, // Enable background image
//src: "https://eo-pic.2x.nz/h", // Background image URL (supports HTTPS)
src: "https://bing.ee123.net/img", // Bing daily theme
position: "center", // Background position: 'top', 'center', 'bottom'
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
index cf23eb2..e132d6a 100644
--- a/src/layouts/Layout.astro
+++ b/src/layouts/Layout.astro
@@ -70,6 +70,10 @@ const bannerOffsetByPosition = {
};
const bannerOffset =
bannerOffsetByPosition[siteConfig.banner.position || "center"];
+
+
+// 周日判断
+const isSunday = new Date().getDay() === 0;
---
@@ -99,7 +103,13 @@ const bannerOffset =
-
+ { isSunday &&
+
+ }
+
+ { !isSunday &&
+
+ }
{favicons.map(favicon => (