网站基础信息

This commit is contained in:
2026-05-03 10:30:51 +08:00
Unverified
parent 5bb4f93b77
commit d7a7cf6fb9
+20 -8
View File
@@ -1,29 +1,29 @@
export const site = { export const site = {
className: "高三 X 班", className: "2024届612班",
title: "毕业一年后,我们依然在场", title: "毕业后,我们依然在场",
subtitle: subtitle:
"把散落在相册、聊天记录和心里的瞬间放回同一个地方。这里先留给高中的三年,也留给一年后的我们。", "把散落在相册、聊天记录和心里的瞬间放回同一个地方。这里先留给高中的三年,也留给一年后的我们。",
anniversary: "2025.06 - 2026.06 · 毕业周年纪念", anniversary: "2024.06 - 2026.06 · 毕业周年纪念",
heroImage: "/assets/campus-hero.png", heroImage: "/assets/campus-hero.png",
footer: "高三 X 班毕业一周年纪念网站 · 初版" footer: "2024届612班纪念网站"
}; };
export const contactLinks = [ export const contactLinks = [
{ {
label: "邮箱", label: "邮箱",
href: "mailto:hello@example.com", href: "mailto:class@biss.click",
icon: "fa-solid fa-envelope" icon: "fa-solid fa-envelope"
}, },
{ {
label: "GitHub", label: "GitHub",
href: "https://github.com/yourname", href: "https://github.com/bishshi/class",
icon: "fa-brands fa-github" icon: "fa-brands fa-github"
}, },
{ {
label: "微信公众号", label: "微信公众号",
href: "#", href: "#",
icon: "fa-brands fa-weixin", 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/" } { 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 = [ export const stats = [
{ value: "1095+", label: "一起经过的高中日子" }, { value: "1095+", label: "一起经过的高中日子" },
{ value: "365", label: "离开校园后的第一年" }, { value: String(getDaysSince(leavingCampusDate)), label: "离开校园后的日子" },
{ value: "∞", label: "还会被想起的瞬间" } { value: "∞", label: "还会被想起的瞬间" }
]; ];