From d7a7cf6fb91e3c2d86b4425e771255c7936eea68 Mon Sep 17 00:00:00 2001 From: biss Date: Sun, 3 May 2026 10:30:51 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E7=AB=99=E5=9F=BA=E7=A1=80=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/data/site.ts | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/data/site.ts b/src/data/site.ts index 6094390..e7cd847 100644 --- a/src/data/site.ts +++ b/src/data/site.ts @@ -1,29 +1,29 @@ export const site = { - className: "高三 X 班", - title: "毕业一年后,我们依然在场", + className: "2024届612班", + title: "毕业后,我们依然在场", subtitle: "把散落在相册、聊天记录和心里的瞬间放回同一个地方。这里先留给高中的三年,也留给一年后的我们。", - anniversary: "2025.06 - 2026.06 · 毕业一周年纪念", + anniversary: "2024.06 - 2026.06 · 毕业周年纪念", heroImage: "/assets/campus-hero.png", - footer: "高三 X 班毕业一周年纪念网站 · 初版" + footer: "2024届612班纪念网站" }; export const contactLinks = [ { label: "邮箱", - href: "mailto:hello@example.com", + href: "mailto:class@biss.click", icon: "fa-solid fa-envelope" }, { label: "GitHub", - href: "https://github.com/yourname", + href: "https://github.com/bishshi/class", icon: "fa-brands fa-github" }, { label: "微信公众号", href: "#", icon: "fa-brands fa-weixin", - qrImage: "/assets/wechat-qr.png" + qrImage: "https://pic.biss.click/image/44a5e576-5cf3-4752-bae2-70d74619324f.webp" } ]; @@ -35,8 +35,20 @@ export const navItems = [ { label: "留言墙", href: "/messages/" } ]; +const leavingCampusDate = "2024-06-08"; +const millisecondsPerDay = 24 * 60 * 60 * 1000; + +const getDaysSince = (date: string) => { + const [year, month, day] = date.split("-").map(Number); + const start = Date.UTC(year, month - 1, day); + const now = new Date(); + const today = Date.UTC(now.getFullYear(), now.getMonth(), now.getDate()); + + return Math.max(0, Math.floor((today - start) / millisecondsPerDay)); +}; + export const stats = [ { value: "1095+", label: "一起经过的高中日子" }, - { value: "365", label: "离开校园后的第一年" }, + { value: String(getDaysSince(leavingCampusDate)), label: "离开校园后的日子" }, { value: "∞", label: "还会被想起的瞬间" } ];