diff --git a/package-lock.json b/package-lock.json index 191c0e0..e13d132 100644 --- a/package-lock.json +++ b/package-lock.json @@ -522,16 +522,6 @@ "tslib": "^2.4.0" } }, - "node_modules/@emnapi/runtime": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz", - "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==", - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/@emnapi/wasi-threads": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/@emnapi/wasi-threads/-/wasi-threads-2.0.1.tgz", @@ -2457,7 +2447,8 @@ "version": "3.13.11", "resolved": "https://registry.npmjs.org/@types/alpinejs/-/alpinejs-3.13.11.tgz", "integrity": "sha512-3KhGkDixCPiLdL3Z/ok1GxHwLxEWqQOKJccgaQL01wc0EVM2tCTaqlC3NIedmxAXkVzt/V6VTM8qPgnOHKJ1MA==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@types/estree": { "version": "1.0.9", @@ -2533,6 +2524,7 @@ "resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.16.1.tgz", "integrity": "sha512-QXcW8MK9JoG8GZ7vCt2cXJlcEPIA7Xk/7IQ1+L2iLp7sXcIxct0PrgidmHzK97gD9QlfUjHXPxujdZ1mC2PYVg==", "license": "MIT", + "peer": true, "dependencies": { "@vue/reactivity": "~3.1.1" } @@ -3068,6 +3060,7 @@ "integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==", "hasInstallScript": true, "license": "MIT", + "peer": true, "bin": { "esbuild": "bin/esbuild" }, @@ -4766,6 +4759,7 @@ "resolved": "https://registry.npmmirror.com/vite/-/vite-8.2.0.tgz", "integrity": "sha512-pn+CFpM0lwDeKwmOq1ZaBK/9sjorZcgqxki6MbY/jPEVd9vichIlmlD4HmQ5wdP5EgqQCFRaACBxMC7uEGc6lQ==", "license": "MIT", + "peer": true, "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.5", diff --git a/src/pages/index.astro b/src/pages/index.astro index 221a71f..8a45c7c 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -3,597 +3,343 @@ import Layout from "../layouts/Layout.astro" import ComingSoon from "../components/ComingSoon.astro" import { getShows, seriesLabel } from "../lib/data" -// 默认 tab(Shows)走 SSR:构建期从接口预取真实数据与多图,首屏立即可见。 -// 其余 tab(Backstage / Events / Street)点击时才由前端请求接口动态渲染,避免一次性拉全量拖慢首屏。 +// SSR 预取走秀数据 const shows = await getShows(20) -// 横向滚动走秀画廊:扁平化所有 show 的图片(cover + gallery 去重), -// 每张卡片 = 一个文章(show)的封面,不展开 gallery,避免同一文章重复出现。 -type GalleryItem = { src: string; brand: string; articleId: number; year: number; title: string; collection_type?: string } + +type GalleryItem = { + src: string; + brand: string; + articleId: number; + year: number; + title: string; + collection_type?: string +} + const galleryItems: GalleryItem[] = [] for (const s of shows) { - if (!s.img) continue - galleryItems.push({ - src: s.img, - brand: s.brand, - articleId: s.id, - year: s.year, - title: s.title, - collection_type: s.collection_type, - }) + if (!s.img) continue + galleryItems.push({ + src: s.img, + brand: s.brand, + articleId: s.id, + year: s.year, + title: s.title, + collection_type: s.collection_type, + }) } --- - -
- -
+
+ +
+
    +
  • + A + Live +
  • +
  • + B + Soon +
  • +
  • + C + Soon +
  • +
  • + D + Soon +
  • + E +
+
- -
- -
- -
-
-

RUNWAY ARCHIVE

-

走秀档案 · 精选最新上架的秀场

-
- 全部走秀 → -
+ +
+ +
+
+
+

RUNWAY ARCHIVE

+

走秀档案 · 精选最新上架的秀场

+
+ 全部走秀 → +
- - {galleryItems.length > 0 && ( -
- -
- )} + + { + galleryItems.length > 0 && ( +
+ +
+ ) + } +
-
+ +
+ +
- -
- -
+ +
+ +
- -
- -
- - -
- -
-
+ +
+ +
+ +
- - - + // 接收 Alpine 发布的图片就绪事件更新布局防闪烁 + window.addEventListener("img-ready", () => { + requestAnimationFrame(() => swiper.update()); + }); + } + \ No newline at end of file