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:
1 parent
24187fc3b7
commit
9ba7113017
98 files changed
+778
-122
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 264 KiB |
@@ -35,7 +35,7 @@
|
||||
* { box-sizing: border-box; }
|
||||
html, body { margin: 0; padding: 0; }
|
||||
body {
|
||||
font-family: "Noto Sans Thai", "Prompt", "Sukhumvit Set", "Sarabun",
|
||||
font-family: "K2D", "Noto Sans Thai", "Prompt", "Sukhumvit Set", "Sarabun",
|
||||
system-ui, -apple-system, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--ink);
|
||||
@@ -65,6 +65,7 @@ img { max-width: 100%; display: block; }
|
||||
width: 44px; height: 44px; border-radius: 12px;
|
||||
background: var(--grad-cta);
|
||||
padding: 4px;
|
||||
object-fit: cover;
|
||||
}
|
||||
.brand__title { margin: 0; font-weight: 800; font-size: 1.05rem; color: var(--ink); }
|
||||
.brand__subtitle { margin: 0; font-size: .72rem; color: var(--muted); }
|
||||
@@ -885,3 +886,56 @@ img { max-width: 100%; display: block; }
|
||||
.stop-node__arrow { display: none; }
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
Design assets polish — hero map bg, sponsor marquee, route photo
|
||||
(จาก web-at-transit-mock: index.html inline + _shared.css)
|
||||
============================================================ */
|
||||
|
||||
/* Hero background map (network/overview-map.png) — laid under hero content */
|
||||
.hero__map {
|
||||
position: absolute; inset: 0;
|
||||
width: 100%; height: 100%;
|
||||
object-fit: cover;
|
||||
opacity: .3; filter: saturate(1.1);
|
||||
z-index: 0; pointer-events: none;
|
||||
}
|
||||
|
||||
/* Sponsor / partner marquee (home page, between hero and main) */
|
||||
.sponsor-section { padding: 26px 0 6px; background: #fff; border-bottom: 1px solid #f0f2f8; }
|
||||
.sponsor-section__head { text-align: center; margin-bottom: 18px; }
|
||||
.sponsor-section__head h4 { margin: 0 0 4px; font-size: 1rem; font-weight: 800; color: var(--ink); letter-spacing: .01em; }
|
||||
.sponsor-section__head p { margin: 0; color: var(--muted); font-size: .84rem; }
|
||||
.marquee { overflow: hidden; position: relative; }
|
||||
.marquee__track {
|
||||
display: flex; width: max-content; padding: 4px 0 16px;
|
||||
animation: marquee-scroll 28s linear infinite;
|
||||
}
|
||||
.marquee:hover .marquee__track { animation-play-state: paused; }
|
||||
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
|
||||
.marquee__tile {
|
||||
flex: 0 0 auto; width: 170px; height: 96px; margin-right: 16px;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
background: #fff; border: 1px solid #eef0f6; border-radius: 14px;
|
||||
box-shadow: 0 4px 12px rgba(63, 43, 94, .05);
|
||||
transition: transform .2s ease, box-shadow .2s ease;
|
||||
}
|
||||
.marquee__tile img { max-width: 78%; max-height: 64%; object-fit: contain; }
|
||||
.marquee__tile:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(63, 43, 94, .12); }
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.marquee__track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; gap: 16px; }
|
||||
.marquee__tile { margin-right: 0; }
|
||||
}
|
||||
|
||||
/* Route detail vehicle/hero photo (design `.mu-vehicle-card` cover pattern) */
|
||||
.route-photo {
|
||||
width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block;
|
||||
border-radius: var(--radius-lg);
|
||||
box-shadow: var(--shadow-md);
|
||||
}
|
||||
|
||||
/* Inline icon alignment inside chips / buttons (Lucide SVG) */
|
||||
.chip .icon, .chip-soft .icon, .toolbar__search .icon {
|
||||
vertical-align: -0.15em; flex: none;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
@@ -1,18 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
|
||||
<defs>
|
||||
<linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" stop-color="#8b5cf6"/>
|
||||
<stop offset="100%" stop-color="#ec4899"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect width="64" height="64" rx="16" fill="url(#bg)"/>
|
||||
<g fill="#fff" transform="translate(8 14)">
|
||||
<rect x="2" y="6" width="44" height="22" rx="6" fill="#fff"/>
|
||||
<rect x="6" y="10" width="14" height="10" rx="2" fill="#8b5cf6"/>
|
||||
<rect x="22" y="10" width="14" height="10" rx="2" fill="#8b5cf6"/>
|
||||
<circle cx="12" cy="32" r="5" fill="#1f2a44"/>
|
||||
<circle cx="36" cy="32" r="5" fill="#1f2a44"/>
|
||||
<circle cx="12" cy="32" r="2" fill="#fff"/>
|
||||
<circle cx="36" cy="32" r="2" fill="#fff"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 808 B |
@@ -1,18 +1,28 @@
|
||||
import "./globals.css";
|
||||
import type { Metadata } from "next";
|
||||
import type { Metadata, Viewport } from "next";
|
||||
import { Header } from "@/components/Header";
|
||||
import { Footer } from "@/components/Footer";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "AT Transit — สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง",
|
||||
title: "Atroute — สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง",
|
||||
description:
|
||||
"ค้นหาเส้นทาง ตารางเดินรถ และจุดจอดในจังหวัดอ่างทองและจังหวัดใกล้เคียง",
|
||||
icons: {
|
||||
icon: [{ url: "/images/icons/minibus-512x512.png", sizes: "512x512", type: "image/png" }],
|
||||
apple: [{ url: "/images/icons/minibus-192x192.png", sizes: "192x192", type: "image/png" }],
|
||||
},
|
||||
};
|
||||
|
||||
export const viewport: Viewport = {
|
||||
themeColor: "#7a4cc0",
|
||||
};
|
||||
|
||||
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<html lang="th">
|
||||
<head>
|
||||
{/* K2D (offline, local woff2 — ตรงกับ design) + Noto/Prompt fallback (CDN) */}
|
||||
<link rel="stylesheet" href="/fonts/k2d.css" />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700;800&family=Prompt:wght@400;500;600;700&display=swap"
|
||||
rel="stylesheet"
|
||||
|
||||
@@ -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>ผู้สนับสนุน & พาร์ทเนอร์</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>
|
||||
|
||||
@@ -3,6 +3,8 @@ import { notFound } from "next/navigation";
|
||||
import { api, isApiNotFoundError, resolveFileUrl, type RouteDetail, type RouteStop, type StopListItem, type Schedule } from "@/lib/api";
|
||||
import LazyMapView from "@/components/LazyMapView";
|
||||
import { VisitTracker } from "@/lib/visit-tracker";
|
||||
import { routePhoto } from "@/lib/images";
|
||||
import { Icon } from "@/components/Icons";
|
||||
|
||||
const TONES = ["sky", "purple", "pink", "mint", "amber"] as const;
|
||||
|
||||
@@ -78,6 +80,9 @@ export default async function RouteDetailPage({
|
||||
stops.map((s) => s.province_th).filter((x): x is string => !!x),
|
||||
);
|
||||
|
||||
// รูปรถ/เส้นทางจาก design (.image/routes/<id>/car|hero)
|
||||
const photo = routePhoto(route.route_id, "car") ?? routePhoto(route.route_id, "hero");
|
||||
|
||||
return (
|
||||
<main className="page">
|
||||
<VisitTracker path={`/routes/${routeId}`} />
|
||||
@@ -159,6 +164,13 @@ export default async function RouteDetailPage({
|
||||
</section>
|
||||
</section>
|
||||
|
||||
{photo && (
|
||||
<section aria-label="รถประจำสาย">
|
||||
<h2 className="section-title">รถประจำสาย</h2>
|
||||
<img className="route-photo" src={photo} alt={`รถของสาย ${route.route_id}`} />
|
||||
</section>
|
||||
)}
|
||||
|
||||
<section className="route-map-section">
|
||||
<div className="route-map-section__head">
|
||||
<h2 className="section-title">เส้นทางวิ่ง</h2>
|
||||
@@ -208,7 +220,7 @@ export default async function RouteDetailPage({
|
||||
<span className="chip-soft chip-soft--sky">{s.station_type}</span>
|
||||
{(s.city_th || s.province_th) && (
|
||||
<span className="stop-node__loc">
|
||||
📍 {[s.city_th, s.province_th].filter(Boolean).join(" · ")}
|
||||
<Icon name="map-pin" size={13} className="icon" /> {[s.city_th, s.province_th].filter(Boolean).join(" · ")}
|
||||
</span>
|
||||
)}
|
||||
{!hasCoord && (
|
||||
@@ -253,7 +265,7 @@ export default async function RouteDetailPage({
|
||||
) : (
|
||||
<div className="schedule-card__times">
|
||||
{s.departure_times.map((t, j) => (
|
||||
<span key={`${s.id}-${j}`} className="schedule-card__time">🕒 {t}</span>
|
||||
<span key={`${s.id}-${j}`} className="schedule-card__time"><Icon name="clock" size={13} className="icon" /> {t}</span>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Link from "next/link";
|
||||
import { api } from "@/lib/api";
|
||||
import { VisitTracker } from "@/lib/visit-tracker";
|
||||
import { Icon } from "@/components/Icons";
|
||||
|
||||
type SP = { group?: string; province?: string };
|
||||
|
||||
@@ -33,7 +34,7 @@ export default async function RoutesPage({ searchParams }: { searchParams: SP })
|
||||
<div className="page-hero__blob page-hero__blob--b" />
|
||||
<div className="page-hero__blob page-hero__blob--c" />
|
||||
<div className="page-hero__inner">
|
||||
<span className="page-hero__badge">🛣️ ROUTE NETWORK</span>
|
||||
<span className="page-hero__badge"><Icon name="bus" size={13} className="icon" /> ROUTE NETWORK</span>
|
||||
<h1 className="page-hero__title">
|
||||
เส้นทางเดินรถ<span className="page-hero__title-grad">ทั้งหมด</span>
|
||||
</h1>
|
||||
@@ -50,7 +51,7 @@ export default async function RoutesPage({ searchParams }: { searchParams: SP })
|
||||
|
||||
<div className="toolbar">
|
||||
<div className="toolbar__search">
|
||||
<span aria-hidden>🔍</span>
|
||||
<Icon name="search" size={16} className="icon" />
|
||||
<input placeholder="ค้นหาเลขสาย หรือชื่อเส้นทาง…" disabled />
|
||||
</div>
|
||||
<div className="toolbar__chips">
|
||||
@@ -81,7 +82,7 @@ export default async function RoutesPage({ searchParams }: { searchParams: SP })
|
||||
<span className={`chip-soft chip-soft--${tone}`}>
|
||||
{r.route_group_label_th || r.route_group_code}
|
||||
</span>
|
||||
<span className="chip-soft chip-soft--mint">🚌 {r.vehicle_type}</span>
|
||||
<span className="chip-soft chip-soft--mint"><Icon name="bus" size={13} className="icon" /> {r.vehicle_type}</span>
|
||||
</div>
|
||||
</div>
|
||||
<span className="tile__arrow" aria-hidden>→</span>
|
||||
|
||||
@@ -3,6 +3,8 @@ import { notFound } from "next/navigation";
|
||||
import { api, isApiNotFoundError, resolveFileUrl, type Schedule, type StopDetail } from "@/lib/api";
|
||||
import LazyMapView from "@/components/LazyMapView";
|
||||
import { VisitTracker } from "@/lib/visit-tracker";
|
||||
import { stopPhoto } from "@/lib/images";
|
||||
import { Icon } from "@/components/Icons";
|
||||
|
||||
const TONES = ["sky", "purple", "pink", "mint", "amber"] as const;
|
||||
|
||||
@@ -46,16 +48,23 @@ export default async function StopDetailsPage({ searchParams }: StopDetailsPageP
|
||||
? [{ id: stop.id, lat: stop.lat as number, lng: stop.lng as number, label: stop.name_th, code: stop.code }]
|
||||
: [];
|
||||
|
||||
// รูปป้ายจาก design (.image/stops/<code>.jpg) — สำคัญกว่า backend images
|
||||
const designPhoto = stopPhoto(stop.code);
|
||||
|
||||
return (
|
||||
<main className="page">
|
||||
<VisitTracker path={`/stops/details?code=${stop.code}`} />
|
||||
<section className="hero">
|
||||
<span className="pill">{stop.station_type}</span>
|
||||
<h1 style={{ marginTop: 10 }}>{stop.name_th}</h1>
|
||||
<p className="muted">📍 {place}{hasMap ? ` · ${stop.lat?.toFixed(4)}, ${stop.lng?.toFixed(4)}` : ""}</p>
|
||||
<p className="muted"><Icon name="map-pin" size={14} className="icon" /> {place}{hasMap ? ` · ${stop.lat?.toFixed(4)}, ${stop.lng?.toFixed(4)}` : ""}</p>
|
||||
</section>
|
||||
<div className="stop-detail__split">
|
||||
{stop.images.length > 0 ? (
|
||||
{designPhoto ? (
|
||||
<div className="stop-detail__gallery">
|
||||
<img className="stop-detail__hero-img" src={designPhoto} alt={stop.name_th} />
|
||||
</div>
|
||||
) : stop.images.length > 0 ? (
|
||||
<div className="stop-detail__gallery">
|
||||
<img
|
||||
className="stop-detail__hero-img"
|
||||
@@ -72,7 +81,7 @@ export default async function StopDetailsPage({ searchParams }: StopDetailsPageP
|
||||
</div>
|
||||
) : (
|
||||
<div className="stop-detail__gallery stop-detail__gallery--empty">
|
||||
<div className="stop-detail__placeholder">📷 ยังไม่มีรูปป้ายนี้</div>
|
||||
<div className="stop-detail__placeholder"><Icon name="camera" size={20} className="icon" /> ยังไม่มีรูปป้ายนี้</div>
|
||||
</div>
|
||||
)}
|
||||
{hasMap ? (
|
||||
@@ -81,7 +90,7 @@ export default async function StopDetailsPage({ searchParams }: StopDetailsPageP
|
||||
</div>
|
||||
) : (
|
||||
<div className="stop-detail__map stop-detail__map--empty">
|
||||
<div className="stop-detail__placeholder">🗺️ ยังไม่มีพิกัดของป้ายนี้</div>
|
||||
<div className="stop-detail__placeholder"><Icon name="map" size={20} className="icon" /> ยังไม่มีพิกัดของป้ายนี้</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
@@ -105,11 +114,11 @@ export default async function StopDetailsPage({ searchParams }: StopDetailsPageP
|
||||
</Link>
|
||||
<div className="schedule-card__meta">
|
||||
<span className="schedule-card__direction">
|
||||
<span aria-hidden>🧭</span>
|
||||
<Icon name="globe" size={13} className="icon" />
|
||||
{s.direction_note || "ไม่ระบุทิศทาง"}
|
||||
</span>
|
||||
{s.schedule_note && (
|
||||
<span className="schedule-card__note">📝 {s.schedule_note}</span>
|
||||
<span className="schedule-card__note"><Icon name="message-circle" size={13} className="icon" /> {s.schedule_note}</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
@@ -118,7 +127,7 @@ export default async function StopDetailsPage({ searchParams }: StopDetailsPageP
|
||||
<span className="schedule-card__empty">— ยังไม่มีรอบ —</span>
|
||||
) : (
|
||||
s.departure_times.map((t, j) => (
|
||||
<span key={j} className="schedule-card__time">🕒 {t}</span>
|
||||
<span key={j} className="schedule-card__time"><Icon name="clock" size={13} className="icon" /> {t}</span>
|
||||
))
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,7 @@ import Link from "next/link";
|
||||
import { api } from "@/lib/api";
|
||||
import LazyMapView from "@/components/LazyMapView";
|
||||
import { VisitTracker } from "@/lib/visit-tracker";
|
||||
import { Icon, type IconName } from "@/components/Icons";
|
||||
|
||||
const TONES = ["sky", "purple", "pink", "mint", "amber"] as const;
|
||||
const TYPE_TONE: Record<string, (typeof TONES)[number]> = {
|
||||
@@ -11,12 +12,12 @@ const TYPE_TONE: Record<string, (typeof TONES)[number]> = {
|
||||
market: "pink",
|
||||
landmark: "mint",
|
||||
};
|
||||
const TYPE_ICON: Record<string, string> = {
|
||||
terminal: "🚍",
|
||||
station: "🚏",
|
||||
pickup: "🛣️",
|
||||
market: "🏪",
|
||||
landmark: "📍",
|
||||
const TYPE_ICON: Record<string, IconName> = {
|
||||
terminal: "bus-front",
|
||||
station: "map-pin",
|
||||
pickup: "bus",
|
||||
market: "store",
|
||||
landmark: "map-pin",
|
||||
};
|
||||
const TYPE_LABEL: Record<string, string> = {
|
||||
terminal: "สถานีขนส่ง",
|
||||
@@ -44,7 +45,7 @@ export default async function StopsPage() {
|
||||
<div className="page-hero__blob page-hero__blob--b" />
|
||||
<div className="page-hero__blob page-hero__blob--c" />
|
||||
<div className="page-hero__inner">
|
||||
<span className="page-hero__badge">🚏 STOP DIRECTORY</span>
|
||||
<span className="page-hero__badge"><Icon name="map-pin" size={13} className="icon" /> STOP DIRECTORY</span>
|
||||
<h1 className="page-hero__title">
|
||||
จุดจอด<span className="page-hero__title-grad">ทั่วประเทศ</span>
|
||||
</h1>
|
||||
@@ -67,13 +68,13 @@ export default async function StopsPage() {
|
||||
|
||||
<div className="toolbar">
|
||||
<div className="toolbar__search">
|
||||
<span aria-hidden>🔍</span>
|
||||
<Icon name="search" size={16} className="icon" />
|
||||
<input placeholder="ค้นหาชื่อป้าย หรือจังหวัด…" disabled />
|
||||
</div>
|
||||
<div className="toolbar__chips">
|
||||
{Object.entries(typeCounts).map(([t, n]) => (
|
||||
<span key={t} className={`chip-soft chip-soft--${TYPE_TONE[t] ?? "sky"}`}>
|
||||
{TYPE_ICON[t] ?? "📍"} {TYPE_LABEL[t] ?? t} · {n}
|
||||
<Icon name={TYPE_ICON[t] ?? "map-pin"} size={13} className="icon" /> {TYPE_LABEL[t] ?? t} · {n}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
@@ -82,7 +83,7 @@ export default async function StopsPage() {
|
||||
<div className="tile-grid">
|
||||
{items.map((s, i) => {
|
||||
const tone = TYPE_TONE[s.station_type] ?? TONES[i % TONES.length];
|
||||
const icon = TYPE_ICON[s.station_type] ?? "📍";
|
||||
const icon = TYPE_ICON[s.station_type] ?? "map-pin";
|
||||
const place = [s.city_th, s.province_th].filter(Boolean).join(" · ");
|
||||
const stopHref = s.code ? `/stops/${encodeURIComponent(s.code)}` : null;
|
||||
return (
|
||||
@@ -93,7 +94,7 @@ export default async function StopsPage() {
|
||||
className={`tile tile--${tone}`}
|
||||
>
|
||||
<div className={`tile__badge tile__badge--${tone}`}>
|
||||
<span>{icon}</span>
|
||||
<Icon name={icon} size={26} />
|
||||
</div>
|
||||
<div className="tile__body">
|
||||
<p className="tile__title">{s.name_th}</p>
|
||||
@@ -103,7 +104,7 @@ export default async function StopsPage() {
|
||||
{TYPE_LABEL[s.station_type] ?? s.station_type}
|
||||
</span>
|
||||
{s.lat != null && s.lng != null && (
|
||||
<span className="chip-soft chip-soft--mint">📍 บนแผนที่</span>
|
||||
<span className="chip-soft chip-soft--mint"><Icon name="map-pin" size={13} className="icon" /> บนแผนที่</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
@@ -112,7 +113,7 @@ export default async function StopsPage() {
|
||||
) : (
|
||||
<div key={s.id} className={`tile tile--${tone} tile--disabled`}>
|
||||
<div className={`tile__badge tile__badge--${tone}`}>
|
||||
<span>{icon}</span>
|
||||
<Icon name={icon} size={26} />
|
||||
</div>
|
||||
<div className="tile__body">
|
||||
<p className="tile__title">{s.name_th}</p>
|
||||
@@ -122,7 +123,7 @@ export default async function StopsPage() {
|
||||
{TYPE_LABEL[s.station_type] ?? s.station_type}
|
||||
</span>
|
||||
{s.lat != null && s.lng != null && (
|
||||
<span className="chip-soft chip-soft--mint">📍 บนแผนที่</span>
|
||||
<span className="chip-soft chip-soft--mint"><Icon name="map-pin" size={13} className="icon" /> บนแผนที่</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user