From 199300b2034c89e132c4399cc8decfd600e653ed Mon Sep 17 00:00:00 2001 From: toom1996 <23cm.cn@gmail.com> Date: Tue, 15 Sep 2026 00:31:31 +0800 Subject: [PATCH] update --- src/components/Breadcrumb.astro | 54 ------------------- src/components/GalleryLightbox.astro | 12 ----- ...adingScreen.astro => LoadingOverlay.astro} | 0 .../{Item.astro => RunwayLookCard.astro} | 0 ...{StreetSnap.astro => StreetSnapCard.astro} | 5 -- .../{pages => views}/AccountPage.astro | 25 ++++++--- .../{Index.astro => views/Home.astro} | 0 .../{pages => views}/ItemPage.astro | 28 ++++++++-- .../{pages => views}/LoginPage.astro | 12 ++++- src/components/{ => views}/RunwayLooks.astro | 9 +--- src/components/{ => views}/StreetSnaps.astro | 8 +-- src/layouts/Layout.astro | 31 +++++++++-- src/lib/config/env.prod.ts | 1 + src/lib/{looks-grid.ts => ui.ts} | 3 +- src/pages/cn/account.astro | 4 +- src/pages/cn/index.astro | 6 +-- src/pages/cn/item/[id].astro | 4 +- src/pages/cn/login.astro | 4 +- src/pages/cn/runway-looks/index.astro | 4 +- src/pages/cn/street-snaps/index.astro | 4 +- src/pages/en/account.astro | 4 +- src/pages/en/index.astro | 6 +-- src/pages/en/item/[id].astro | 4 +- src/pages/en/login.astro | 4 +- src/pages/en/runway-looks/index.astro | 4 +- src/pages/en/street-snaps/index.astro | 4 +- src/pages/index.astro | 6 +-- 27 files changed, 114 insertions(+), 132 deletions(-) delete mode 100644 src/components/Breadcrumb.astro rename src/components/{LoadingScreen.astro => LoadingOverlay.astro} (100%) rename src/components/{Item.astro => RunwayLookCard.astro} (100%) rename src/components/{StreetSnap.astro => StreetSnapCard.astro} (98%) rename src/components/{pages => views}/AccountPage.astro (93%) rename src/components/{Index.astro => views/Home.astro} (100%) rename src/components/{pages => views}/ItemPage.astro (76%) rename src/components/{pages => views}/LoginPage.astro (94%) rename src/components/{ => views}/RunwayLooks.astro (99%) rename src/components/{ => views}/StreetSnaps.astro (99%) rename src/lib/{looks-grid.ts => ui.ts} (96%) diff --git a/src/components/Breadcrumb.astro b/src/components/Breadcrumb.astro deleted file mode 100644 index 482d20c..0000000 --- a/src/components/Breadcrumb.astro +++ /dev/null @@ -1,54 +0,0 @@ ---- -import { getI18n } from "@/lib/i18n"; - -interface Crumb { - /** i18n key:英文原文,如 'Home' / 'Runway Archive';中文环境自动取字典翻译 */ - label: string; - href: string; -} - -interface Props { - /** 中间层级的面包屑项(不含末项)。末项由 提供(如动态年份) */ - items?: Crumb[]; - /** 可选:显式指定语言;缺省时跟随当前页面语言(Astro.currentLocale) */ - locale?: string; -} - -const {t, locale, getRelativeLocaleUrl} = getI18n(Astro); -const { items = [] } = Astro.props; ---- - - - - diff --git a/src/components/GalleryLightbox.astro b/src/components/GalleryLightbox.astro index e965718..1a2796e 100644 --- a/src/components/GalleryLightbox.astro +++ b/src/components/GalleryLightbox.astro @@ -162,18 +162,6 @@ const thumbAspect = aspect === "3/4" ? "aspect-[3/4]" : "aspect-[2/3]" -
- -
- {t('Click image to zoom · Scroll to view · Esc to close')} -
- {/* 各页独有的附加层(走秀页注入「当前 look 的细节图簇」;街拍页不传) */} diff --git a/src/components/LoadingScreen.astro b/src/components/LoadingOverlay.astro similarity index 100% rename from src/components/LoadingScreen.astro rename to src/components/LoadingOverlay.astro diff --git a/src/components/Item.astro b/src/components/RunwayLookCard.astro similarity index 100% rename from src/components/Item.astro rename to src/components/RunwayLookCard.astro diff --git a/src/components/StreetSnap.astro b/src/components/StreetSnapCard.astro similarity index 98% rename from src/components/StreetSnap.astro rename to src/components/StreetSnapCard.astro index a181e27..a4812dd 100644 --- a/src/components/StreetSnap.astro +++ b/src/components/StreetSnapCard.astro @@ -1,6 +1,5 @@ --- import type { RawStreetSnap } from "@/lib/api" -import Breadcrumb from "@/components/Breadcrumb.astro" import GalleryLightbox from "@/components/GalleryLightbox.astro" import { getI18n } from "@/lib/i18n" import { href, ROUTES } from '@/lib/routes' @@ -55,10 +54,6 @@ const displayTitle = (snap?.title || "").replace(/\t/g, " · ") { snap ? (
- - {displayTitle} - -

{displayTitle}

diff --git a/src/components/pages/AccountPage.astro b/src/components/views/AccountPage.astro similarity index 93% rename from src/components/pages/AccountPage.astro rename to src/components/views/AccountPage.astro index 4407318..7086002 100644 --- a/src/components/pages/AccountPage.astro +++ b/src/components/views/AccountPage.astro @@ -4,9 +4,18 @@ import Layout from "@/layouts/Layout.astro" import { getI18n } from "@/lib/i18n" import { href, ROUTES } from "@/lib/routes" +import { config } from '@/lib/config' const { locale, t } = getI18n(Astro) +const SITE_NAME = config.siteName ?? "Xisoa" +const accountDesc = locale === 'cn' + ? `管理你在 ${SITE_NAME} 的收藏造型与浏览历史。` + : `Manage your saved looks and view history on your ${SITE_NAME} account.` +const accountKeywords = locale === 'cn' + ? `账户,收藏,浏览历史,${SITE_NAME}` + : `account,saved looks,history,${SITE_NAME}` + const titleLabel = t("my account") const pleaseLabel = t("please log in") const loginLabel = t("login") @@ -22,7 +31,7 @@ const noSavedLabel = t("no saved looks yet") const noHistoryLabel = t("no history yet") const browseLabel = t("browse the archive") --- - +
@@ -96,12 +105,12 @@ const browseLabel = t("browse the archive")