update
Some checks failed
deploy / deploy (push) Has been cancelled

This commit is contained in:
toom1996
2026-08-18 00:47:04 +08:00
parent e83fff9a9f
commit 55c199a5c1
39 changed files with 462 additions and 190 deletions

View File

@ -0,0 +1,51 @@
---
import { useTranslations, DEFAULT_LOCALE, type Locale } from "@/i18n/utils";
interface Crumb {
/** i18n key:英文原文,如 'Home' / 'Runway Archive';中文环境自动取字典翻译 */
label: string;
href: string;
}
interface Props {
/** 中间层级的面包屑项(不含末项)。末项由 <slot name="current"> 提供(如动态年份) */
items?: Crumb[];
/** 可选:显式指定语言;缺省时跟随当前页面语言(Astro.currentLocale) */
locale?: string;
}
const { items = [], locale } = Astro.props;
const currentLocale = (locale ?? Astro.currentLocale ?? DEFAULT_LOCALE) as Locale;
const { t } = useTranslations(currentLocale);
---
<nav class="crumb" aria-label="Breadcrumb">
{
items.map((it) => (
<Fragment>
<a href={it.href} class="crumb-link">{t(it.label)}</a>
<span class="crumb-sep" aria-hidden="true">/</span>
</Fragment>
))
}
<span class="crumb-cur" aria-current="page">
<slot name="current" />
</span>
</nav>
<style>
@reference "tailwindcss";
.crumb {
@apply inline-flex items-center gap-[10px] mb-[10px] text-[11px] tracking-[0.18em] uppercase text-[#999] no-underline;
}
.crumb-link {
@apply text-black no-underline transition-colors duration-150 hover:text-[#888];
}
.crumb-sep {
@apply text-[#cfcfcf] select-none;
}
.crumb-cur {
@apply text-[#999];
}
</style>

View File

@ -1,15 +1,14 @@
---
import ComingSoon from "./ComingSoon.astro"
import { getShows, seriesLabel } from "../lib/data"
import { useTranslations, DEFAULT_LOCALE, type Locale } from "../i18n/utils"
import ComingSoon from "@/components/ComingSoon.astro"
import { getShows, seriesLabel } from "@/lib/data"
import { getI18n } from "@/i18n/utils"
// SSR 预取走秀数据
const shows = await getShows(20)
// 国际化:取当前页面语言(Astro 路由解析)与翻译函数
const locale = (Astro.currentLocale as Locale) ?? DEFAULT_LOCALE
const { t } = useTranslations(locale)
// 国际化:一行取当前语言 + 翻译函数
const { locale, t } = getI18n(Astro)
type GalleryItem = {
src: string;

View File

View File

@ -1,6 +1,6 @@
---
import astroLogo from '../assets/astro.svg';
import background from '../assets/background.svg';
import astroLogo from '@/assets/astro.svg';
import background from '@/assets/background.svg';
---
<div id="container">

View File

@ -1,6 +1,6 @@
---
// 页面主体(与语言无关的内容),由根页面与 [locale] 页面共用
import ComingSoon from "../../components/ComingSoon.astro"
import ComingSoon from "@/components/ComingSoon.astro"
---
<ComingSoon module="About" moduleZh="关于" />

View File

@ -1,6 +1,6 @@
---
// 页面主体(与语言无关的内容),由根页面与 [locale] 页面共用
import ComingSoon from "../../components/ComingSoon.astro"
import ComingSoon from "@/components/ComingSoon.astro"
---
<ComingSoon module="Contact" moduleZh="联系" />

View File

@ -1,6 +1,6 @@
---
// 页面主体(与语言无关的内容),由根页面与 [locale] 页面共用
import ComingSoon from "../../components/ComingSoon.astro"
import ComingSoon from "@/components/ComingSoon.astro"
---
<ComingSoon module="Latest Projects" moduleZh="最新项目" />

View File

@ -1,6 +1,6 @@
---
// 页面主体(与语言无关的内容),由根页面与 [locale] 页面共用
import ComingSoon from "../../components/ComingSoon.astro"
import ComingSoon from "@/components/ComingSoon.astro"
---
<ComingSoon module="Sign In" moduleZh="登录" note="账户系统正在筹备中,暂未开放注册与登录。" />

View File

@ -1,6 +1,6 @@
---
// 页面主体(与语言无关的内容),由根页面与 [locale] 页面共用
import ComingSoon from "../../components/ComingSoon.astro"
import ComingSoon from "@/components/ComingSoon.astro"
---
<ComingSoon module="Portfolio" moduleZh="作品集" />

View File

@ -1,6 +1,6 @@
---
// 页面主体(与语言无关的内容),由根页面与 [locale] 页面共用
import ComingSoon from "../../components/ComingSoon.astro"
import ComingSoon from "@/components/ComingSoon.astro"
---
<ComingSoon module="Create Account" moduleZh="注册" note="账户系统正在筹备中,暂未开放注册与登录。" />

View File

@ -31,7 +31,7 @@
</div>
<!-- 标题 -->
<h1 class="font-serif font-black leading-[0.95] tracking-tight text-[10vw] md:text-[4.5rem] mt-8" x-text="article?.title"></h1>
<h1 class="font-black leading-[0.95] tracking-tight text-[10vw] md:text-[4.5rem] mt-8" x-text="article?.title"></h1>
<!-- 元信息 -->
<div class="mt-6 flex flex-wrap items-center gap-x-6 gap-y-2 text-[12px] font-mono uppercase tracking-widest text-[#666]">
@ -42,32 +42,8 @@
</template>
</div>
<!-- 正文 -->
<div class="mt-12 grid md:grid-cols-12 gap-8">
<div class="md:col-span-2 text-[11px] font-mono uppercase tracking-widest text-[#999] pt-1">
Report
</div>
<div class="md:col-span-10 max-w-[68ch] space-y-5 text-[16px] leading-[1.9] text-[#222]">
<template x-for="(paragraph, idx) in bodyParagraphs" :key="idx">
<p x-text="paragraph"></p>
</template>
</div>
</div>
<!-- 图片集 -->
<section class="mt-16" x-show="article?.images && article.images.length > 0">
<div class="flex items-end justify-between border-b border-[#eee] pb-3 mb-6">
<div class="text-[11px] font-mono uppercase tracking-[0.25em] text-[#999]">
Gallery <span class="ml-2 text-black" x-text="`· 共 ${article?.images?.length || 0} 张`"></span>
</div>
<button
type="button"
@click="openLb(0)"
class="text-[11px] font-mono uppercase tracking-widest border border-black px-3 py-1.5 hover:bg-black hover:text-white transition-colors cursor-pointer"
>
⤢ 全屏查看
</button>
</div>
<!-- 图片网格 -->
<div class="grid grid-cols-2 md:grid-cols-3 gap-4">

View File

@ -1,5 +1,5 @@
---
import { getReports, fmtDate } from "../../lib/data"
import { getReports, fmtDate } from "@/lib/data"
// 文章展示创意布局页:复用你现有的 Layout 外壳。
// 数据由数据层 getReports() 统一从后端公开接口拉取(见 src/lib/data.ts);