diff --git a/src/data/site.ts b/src/data/site.ts index 99beaf7..6094390 100644 --- a/src/data/site.ts +++ b/src/data/site.ts @@ -8,6 +8,25 @@ export const site = { footer: "高三 X 班毕业一周年纪念网站 · 初版" }; +export const contactLinks = [ + { + label: "邮箱", + href: "mailto:hello@example.com", + icon: "fa-solid fa-envelope" + }, + { + label: "GitHub", + href: "https://github.com/yourname", + icon: "fa-brands fa-github" + }, + { + label: "微信公众号", + href: "#", + icon: "fa-brands fa-weixin", + qrImage: "/assets/wechat-qr.png" + } +]; + export const navItems = [ { label: "首页", href: "/" }, { label: "三年时间线", href: "/timeline/" }, diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index b2efc44..77968e4 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -1,12 +1,23 @@ --- import "../styles/global.css"; -import { navItems, site } from "../data/site"; +import packageJson from "../../package.json"; +import { contactLinks, navItems, site } from "../data/site"; interface Props { title?: string; } const { title = site.title } = Astro.props; +const buildTime = new Intl.DateTimeFormat("zh-CN", { + timeZone: "Asia/Shanghai", + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit", + second: "2-digit", + hour12: false +}).format(new Date()); --- @@ -19,6 +30,10 @@ const { title = site.title } = Astro.props; rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.css" /> +