feat(ui): port design UI + static assets from web-at-transit-mock

- copy .image assets to frontend/public/images (logo, hero map,
  partner logos, route/stop photos, qrcode, landmarks)
- add K2D fonts (offline local woff2) in frontend/public/fonts
- add Lucide icon components (Icons.tsx); replace all emoji icons
- add lib/images.ts static asset resolver (route/stop/partner/logo)
- header/footer/home: minibus logo, hero map bg, partner marquee
- route detail: design car/hero photo; stop detail: design stop photo
- .gitignore: un-ignore frontend/public/images + app icons so the
  frontend Docker build ships the assets
This commit is contained in:
phattaranun.a committed 2026-10-10 16:32:03 +07:00
1 parent 24187fc3b7
commit 9ba7113017
98 files changed
+778 -122

No files matched your search

+26 -2
View File
@@ -1,6 +1,8 @@
import Link from "next/link";
import { api, type RouteListItem } from "@/lib/api";
import { VisitTracker } from "@/lib/visit-tracker";
import { HERO_MAP, PARTNERS } from "@/lib/images";
import { Icon } from "@/components/Icons";
// Map route_group_code to visual tone
const ZONE_TONES: Record<string, "sky" | "purple" | "pink" | "mint"> = {
@@ -46,16 +48,21 @@ export default async function HomePage() {
return (ai === -1 ? 99 : ai) - (bi === -1 ? 99 : bi);
});
// Duplicate partner tiles for a seamless marquee loop
const marqueePartners = [...PARTNERS, ...PARTNERS];
return (
<>
<VisitTracker path="/" />
<section className="hero">
{/* แผนที่เครือข่าย (จาก design: .image/network/overview-map.png) */}
<img className="hero__map" src={HERO_MAP} alt="" aria-hidden="true" />
<div className="hero__blob one" aria-hidden />
<div className="hero__blob two" aria-hidden />
<div className="hero__blob three" aria-hidden />
<div className="container hero__inner">
<span className="hero__badge">✨ ยินดีต้อนรับ</span>
<span className="hero__badge">ยินดีต้อนรับ</span>
<h1>
สถานีขนส่งผู้โดยสารภายใน
<br />
@@ -83,6 +90,23 @@ export default async function HomePage() {
</div>
</section>
{/* ผู้สนับสนุน & พาร์ทเนอร์ (marquee — จาก design) */}
<section className="sponsor-section" aria-label="ผู้สนับสนุนและพาร์ทเนอร์">
<div className="sponsor-section__head">
<h4>ผู้สนับสนุน &amp; พาร์ทเนอร์</h4>
<p>ร่วมเป็นผู้สนับสนุนเราได้ เมื่อซื้อของออนไลน์ หรือซื้อตั๋วรถทัวร์ เครื่องบิน ออนไลน์</p>
</div>
<div className="marquee">
<div className="marquee__track">
{marqueePartners.map((p, i) => (
<span key={`${p.id}-${i}`} className="marquee__tile" aria-label={p.label}>
<img src={p.src} alt={p.label} decoding="async" loading="lazy" />
</span>
))}
</div>
</div>
</section>
<main className="main">
<div className="container">
{orderedGroups.map((g) => {
@@ -110,7 +134,7 @@ export default async function HomePage() {
<div className="card__body">
<p className="card__name">{r.name_th}</p>
<span className={`chip ${CHIP_CYCLE[i % CHIP_CYCLE.length]}`}>
✅ ดูตาราง
<Icon name="check" size={12} className="icon" /> ดูตาราง
</span>
</div>
</Link>