From 3e461eda7a7f335eadcb915b36db1ef3dfd16d35 Mon Sep 17 00:00:00 2001 From: ClovertaTheTrilobita Date: Thu, 16 Apr 2026 20:50:59 +0300 Subject: [PATCH 1/5] adjust color palette --- src/components/Footer.astro | 4 ++-- src/components/Navigation.astro | 4 ++-- src/layouts/MarkdownPostLayout.astro | 1 + src/styles/global.css | 29 +++++++++++----------------- 4 files changed, 16 insertions(+), 22 deletions(-) diff --git a/src/components/Footer.astro b/src/components/Footer.astro index ffe7c1d..e0ca0c3 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -27,9 +27,9 @@ const t = getTranslations(lang); margin-bottom: 1rem; background: repeating-linear-gradient( -45deg, - #e96b6b 0 14px, + #ef5a6f 0 14px, transparent 14px 28px, - #7da2ff 28px 42px, + #536493 28px 42px, transparent 42px 56px ); pointer-events: none; diff --git a/src/components/Navigation.astro b/src/components/Navigation.astro index d2346e4..804ee06 100644 --- a/src/components/Navigation.astro +++ b/src/components/Navigation.astro @@ -42,9 +42,9 @@ const t = getTranslations(lang); height: 12px; background: repeating-linear-gradient( -45deg, - #e96b6b 0 14px, + #ef5a6f 0 14px, transparent 14px 28px, - #7da2ff 28px 42px, + #536493 28px 42px, transparent 42px 56px ); pointer-events: none; diff --git a/src/layouts/MarkdownPostLayout.astro b/src/layouts/MarkdownPostLayout.astro index 55686b4..873ed51 100644 --- a/src/layouts/MarkdownPostLayout.astro +++ b/src/layouts/MarkdownPostLayout.astro @@ -240,6 +240,7 @@ const t = getTranslations(lang); "Noto Sans CJK SC", "Source Han Sans SC", sans-serif; + font-weight: 400; } .post-content :global(code), diff --git a/src/styles/global.css b/src/styles/global.css index 05af1c9..8e0e6dd 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -34,20 +34,11 @@ article svg[id^="mermaid-"] { html { /* font-family: "Maple Mono", "Maple Mono CN", monospace; */ - font-family: - system-ui, - -apple-system, - BlinkMacSystemFont, - "Segoe UI", - Roboto, - Oxygen, - Ubuntu, - Cantarell, - "Open Sans", - "Helvetica Neue", - sans-serif; - background-color: #ffffff; - color: #1f2328; + font-family: 'Noto Serif SC', serif; + font-weight: 500; + /* background-color: #ffffff; */ + background-color: #fffbf8; + color: #0E2F56; } html { @@ -74,13 +65,14 @@ body::after { /* 按需调整大小 */ height: 400px; /* 按需调整大小 */ - background-image: url("https://files.seeusercontent.com/2026/03/30/4Xfr/bc7e804dc2c8ecaf407c9d665414ff72.webp"); + background-image: url("https://files.seeusercontent.com/2026/04/16/1sXb/touhou___kirisame_marisa__2__by_.webp"); background-repeat: no-repeat; background-position: right bottom; background-size: contain; opacity: 0.35; pointer-events: none; z-index: -1; + } html.dark body::after { @@ -116,7 +108,7 @@ h1 { a { - color: #416bd6; + color: #3D74B6; font-weight: 700; text-decoration: none; } @@ -201,8 +193,9 @@ img { display: block; margin: 0 0 14px 0; padding: 0.6rem 1rem; - border: 1.5px dashed #aeb8c2; - background-color: #f3f5f7; + border: 2px dashed #aeb8c2; + background-color: #fffefc; + } .comment-card:last-child { From c2ed2992d9cd098f443ebfe370eab2d15a09dd6a Mon Sep 17 00:00:00 2001 From: ClovertaTheTrilobita Date: Thu, 16 Apr 2026 20:53:26 +0300 Subject: [PATCH 2/5] adjusted width --- src/styles/global.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/global.css b/src/styles/global.css index bd20422..8e0e6dd 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -50,7 +50,7 @@ html { body { margin: 0 auto; width: 100%; - max-width: 78ch; + max-width: 90ch; padding: 1rem; line-height: 1.7; font-size: 1.15rem; From 7ccdcad86683fcca5508485af0cd1f8f15019502 Mon Sep 17 00:00:00 2001 From: ClovertaTheTrilobita Date: Thu, 16 Apr 2026 20:57:00 +0300 Subject: [PATCH 3/5] adjust color --- src/styles/global.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/styles/global.css b/src/styles/global.css index 8e0e6dd..ec220d1 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -37,7 +37,7 @@ html { font-family: 'Noto Serif SC', serif; font-weight: 500; /* background-color: #ffffff; */ - background-color: #fffbf8; + background-color: #F9F2ED; color: #0E2F56; } @@ -194,7 +194,7 @@ img { margin: 0 0 14px 0; padding: 0.6rem 1rem; border: 2px dashed #aeb8c2; - background-color: #fffefc; + background-color: #fbf5f2; } From d76f371c728c7019ab267c433572fe8d86f325aa Mon Sep 17 00:00:00 2001 From: ClovertaTheTrilobita Date: Thu, 16 Apr 2026 21:10:25 +0300 Subject: [PATCH 4/5] hash test --- package.json | 4 +-- src/components/BuildHashBlocks.astro | 42 ++++++++++++++++++++++++++++ src/components/Footer.astro | 5 +++- 3 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 src/components/BuildHashBlocks.astro diff --git a/package.json b/package.json index 8ef3aa5..3d509c8 100644 --- a/package.json +++ b/package.json @@ -6,10 +6,10 @@ "node": ">=22.12.0" }, "scripts": { - "dev": "astro dev", + "dev": "PUBLIC_GIT_COMMIT=$(git rev-parse HEAD) astro dev", "preview": "astro preview", "astro": "astro", - "build": "astro build" + "build": "PUBLIC_GIT_COMMIT=$(git rev-parse HEAD) astro build" }, "dependencies": { "@astrojs/rss": "^4.0.17", diff --git a/src/components/BuildHashBlocks.astro b/src/components/BuildHashBlocks.astro new file mode 100644 index 0000000..c6f703d --- /dev/null +++ b/src/components/BuildHashBlocks.astro @@ -0,0 +1,42 @@ +--- +const rawHash = (import.meta.env.PUBLIC_GIT_COMMIT || "") + .replace(/[^a-fA-F0-9]/g, "") + .toLowerCase(); + +const safeHash = rawHash || "0000000000000000000000000000000000000000"; + +const blockCount = 6; +const hexPerBlock = 6; + +const blocks: string[] = Array.from({ length: blockCount }, (_, i) => { + const start = i * hexPerBlock; + const part = safeHash.slice(start, start + hexPerBlock).padEnd(6, "0"); + return `#${part}`; +}); +--- + +
+ { + blocks.map((color: string) => ( + + )) + } +
+ + diff --git a/src/components/Footer.astro b/src/components/Footer.astro index e0ca0c3..0836412 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,6 +1,7 @@ --- import { getLangFromUrl, getTranslations, type Lang } from "@/i18n"; - +import BuildHashBlocks from "@/components/BuildHashBlocks.astro"; +const commit = import.meta.env.PUBLIC_GIT_COMMIT || "unknown"; const lang = getLangFromUrl(Astro.url); const t = getTranslations(lang); --- @@ -8,6 +9,8 @@ const t = getTranslations(lang);

+ + {commit.slice(0, 7)}

diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 0836412..df7648d 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -7,19 +7,79 @@ const t = getTranslations(lang); ---
-

-

+ + +

+ + + - {commit.slice(0, 7)}
diff --git a/src/i18n/en.ts b/src/i18n/en.ts index d294470..69350fa 100644 --- a/src/i18n/en.ts +++ b/src/i18n/en.ts @@ -43,7 +43,7 @@ export default { '· Parsifal\'s Blog', "· And some other websites whose names I have unfortunately forgotten", "Thank you for your ideas and passion!", - "In addition, this blog is fully open source. You can find its source code through the link in the footer.", + "In addition, this blog is open source under MIT License. You can find its source code through the link in the footer.", ] }, tags: { diff --git a/src/i18n/zh.ts b/src/i18n/zh.ts index 593d874..b0b72fc 100644 --- a/src/i18n/zh.ts +++ b/src/i18n/zh.ts @@ -43,7 +43,7 @@ export default { '· Parsifal\'s Blog', "· 还有一些已经忘记名字的网站", "谢谢你们的想法和热情!", - "此外,这个博客完全开源,你可以从页脚的链接处获取它的源代码。", + "此外,这个博客的源码使用 MIT 协议开源,你可以从页脚的链接处获取它的源代码。", ] }, tags: {