diff --git a/src/app/components/landing/HeritageMarquee.tsx b/src/app/components/landing/HeritageMarquee.tsx index f12a633..7ef677a 100644 --- a/src/app/components/landing/HeritageMarquee.tsx +++ b/src/app/components/landing/HeritageMarquee.tsx @@ -1,27 +1,38 @@ +import Link from "next/link"; import { heritageSites } from "@/app/content"; -// Dải tên di tích chạy ngang liên tục, gợi bề dày của hệ thống di sản. -// Lặp danh sách 2 lần để vòng lặp khép kín; dừng khi prefers-reduced-motion. +// Dải tên di tích cuộn liên tục từ phải sang trái (vòng lặp khép kín). +// Danh sách được lặp 2 lần và track dịch -50% -> điểm nối trùng khít, không giật. +// Rê chuột để tạm dừng và bấm vào tên để mở trang chi tiết. export function HeritageMarquee() { - const names = heritageSites.map((site) => site.name); - const loop = [...names, ...names]; + const loop = [...heritageSites, ...heritageSites]; return (
-
- {loop.map((name, index) => ( - = names.length}> - - {name} - - - - ))} -
+
); diff --git a/src/app/globals.css b/src/app/globals.css index 32e4a00..5ef08ee 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -292,7 +292,7 @@ a { .public-hero-inner::before, .public-hero-inner::after { - content: ""; + content: none; /* gỡ đường hairline trang trí (đè lên nút CTA) */ position: absolute; pointer-events: none; } @@ -1423,14 +1423,18 @@ a { .heritage-marquee-track { display: inline-flex; width: max-content; + margin: 0; + padding: 0; + list-style: none; align-items: center; white-space: nowrap; will-change: transform; + transform: translate3d(0, 0, 0); } @media (prefers-reduced-motion: no-preference) { .heritage-marquee-track { - animation: heritage-marquee 46s linear infinite; + animation: heritage-marquee 42s linear infinite; } .heritage-marquee:hover .heritage-marquee-track {