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
No files matched your search
@@ -14,4 +14,16 @@ script/images
|
||||
*.jpeg
|
||||
*.sql
|
||||
!backend/migrations/*.sql
|
||||
*.vps
|
||||
*.vps
|
||||
|
||||
# Design assets ported from web-at-transit-mock — MUST be committed so the
|
||||
# `frontend` Docker build ships them (logo, hero map, partner logos,
|
||||
# route/stop photos). The global *.png/*.jpg/*.jpeg rules above would
|
||||
# otherwise drop them from the deploy.
|
||||
!frontend/public/images/
|
||||
!frontend/public/images/**
|
||||
!frontend/src/app/icon.png
|
||||
!frontend/src/app/apple-icon.png
|
||||
|
||||
# Next.js build cache — never commit
|
||||
frontend/tsconfig.tsbuildinfo
|
||||
@@ -0,0 +1,161 @@
|
||||
@font-face {
|
||||
font-family: 'K2D';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
font-display: swap;
|
||||
src: url(./k2d-300-thai.woff2) format('woff2');
|
||||
unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'K2D';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
font-display: swap;
|
||||
src: url(./k2d-300-latin-ext.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'K2D';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
font-display: swap;
|
||||
src: url(./k2d-300-latin.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'K2D';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url(./k2d-400-thai.woff2) format('woff2');
|
||||
unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'K2D';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url(./k2d-400-latin-ext.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'K2D';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url(./k2d-400-latin.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'K2D';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url(./k2d-500-thai.woff2) format('woff2');
|
||||
unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'K2D';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url(./k2d-500-latin-ext.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'K2D';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url(./k2d-500-latin.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'K2D';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url(./k2d-600-thai.woff2) format('woff2');
|
||||
unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'K2D';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url(./k2d-600-latin-ext.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'K2D';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url(./k2d-600-latin.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'K2D';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url(./k2d-700-thai.woff2) format('woff2');
|
||||
unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'K2D';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url(./k2d-700-latin-ext.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'K2D';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url(./k2d-700-latin.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'K2D';
|
||||
font-style: normal;
|
||||
font-weight: 800;
|
||||
font-display: swap;
|
||||
src: url(./k2d-800-thai.woff2) format('woff2');
|
||||
unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'K2D';
|
||||
font-style: normal;
|
||||
font-weight: 800;
|
||||
font-display: swap;
|
||||
src: url(./k2d-800-latin-ext.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'K2D';
|
||||
font-style: normal;
|
||||
font-weight: 800;
|
||||
font-display: swap;
|
||||
src: url(./k2d-800-latin.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 673 KiB |
@@ -0,0 +1,18 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<circle cx="12" cy="13" r="8" />
|
||||
<path d="M12 9v4l2 2" />
|
||||
<path d="M5 3 2 6" />
|
||||
<path d="m22 6-3-3" />
|
||||
<path d="M6.38 18.7 4 21" />
|
||||
<path d="M17.64 18.67 20 21" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 384 B |
@@ -0,0 +1,14 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M5 12h14" />
|
||||
<path d="m12 5 7 7-7 7" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 261 B |
@@ -0,0 +1,21 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M4 6 2 7" />
|
||||
<path d="M10 6h4" />
|
||||
<path d="m22 7-2-1" />
|
||||
<rect width="16" height="16" x="4" y="3" rx="2" />
|
||||
<path d="M4 11h16" />
|
||||
<path d="M8 15h.01" />
|
||||
<path d="M16 15h.01" />
|
||||
<path d="M6 19v2" />
|
||||
<path d="M18 21v-2" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 456 B |
@@ -0,0 +1,19 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M8 6v6" />
|
||||
<path d="M15 6v6" />
|
||||
<path d="M2 12h19.6" />
|
||||
<path d="M18 18h3s.5-1.7.8-2.8c.1-.4.2-.8.2-1.2 0-.4-.1-.8-.2-1.2l-1.4-5C20.1 6.8 19.1 6 18 6H4a2 2 0 0 0-2 2v10h3" />
|
||||
<circle cx="7" cy="18" r="2" />
|
||||
<path d="M9 18h5" />
|
||||
<circle cx="16" cy="18" r="2" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 492 B |
@@ -0,0 +1,13 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M20 6 9 17l-5-5" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 239 B |
@@ -0,0 +1,14 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<circle cx="12" cy="12" r="10" />
|
||||
<path d="M12 6v6l4 2" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 271 B |
@@ -0,0 +1,15 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<circle cx="12" cy="12" r="10" />
|
||||
<path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" />
|
||||
<path d="M2 12h20" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 331 B |
@@ -0,0 +1,16 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M5 22h14" />
|
||||
<path d="M5 2h14" />
|
||||
<path d="M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22" />
|
||||
<path d="M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 432 B |
@@ -0,0 +1,14 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0" />
|
||||
<circle cx="12" cy="10" r="3" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 359 B |
@@ -0,0 +1,15 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z" />
|
||||
<path d="M15 5.764v15" />
|
||||
<path d="M9 3.236v15" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 516 B |
@@ -0,0 +1,13 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 347 B |
@@ -0,0 +1,13 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 437 B |
@@ -0,0 +1,16 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" />
|
||||
<path d="M21 3v5h-5" />
|
||||
<path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" />
|
||||
<path d="M8 16H3v5" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 392 B |
@@ -0,0 +1,14 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="m21 21-4.34-4.34" />
|
||||
<circle cx="11" cy="11" r="8" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 275 B |
@@ -0,0 +1,15 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" />
|
||||
<path d="M12 9v4" />
|
||||
<path d="M12 17h.01" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 345 B |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 264 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 1.6 MiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 3.4 MiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 94 KiB |
|
After Width: | Height: | Size: 2.5 MiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 135 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 2.1 MiB |
|
After Width: | Height: | Size: 2.5 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 233 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 2.1 MiB |
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 2.7 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 217 KiB |
|
After Width: | Height: | Size: 217 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 127 KiB |
|
After Width: | Height: | Size: 520 KiB |
|
After Width: | Height: | Size: 520 KiB |
|
After Width: | Height: | Size: 188 KiB |
|
After Width: | Height: | Size: 253 KiB |
|
After Width: | Height: | Size: 251 KiB |
|
After Width: | Height: | Size: 225 KiB |
|
After Width: | Height: | Size: 160 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 |
|
After Width: | Height: | Size: 24 KiB |
|
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;
|
||||
}
|
||||
|
||||
|
||||
|
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>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Link from "next/link";
|
||||
import Image from "next/image";
|
||||
import { api, resolveFileUrl } from "@/lib/api";
|
||||
import { LOGO, PARTNERS } from "@/lib/images";
|
||||
import { Icon } from "@/components/Icons";
|
||||
|
||||
const popularRoutes = [
|
||||
{ id: "101", label: "สาย 101 · อ่างทอง-อยุธยา" },
|
||||
@@ -9,43 +10,16 @@ const popularRoutes = [
|
||||
{ id: "464", label: "สาย 464 · สุพรรณ-สระบุรี" },
|
||||
];
|
||||
|
||||
const SPONSOR_LABELS: Record<string, string> = {
|
||||
"7-11": "7-Eleven",
|
||||
"shopee": "Shopee",
|
||||
"lazada": "Lazada",
|
||||
"airasia-move": "airasia MOVE",
|
||||
"busonlineticket": "busonlineticket",
|
||||
"trip": "Trip.com",
|
||||
"truck2hand": "truck2hand",
|
||||
"tcl999-angthong": "ทีซีแอล 999 อ่างทอง",
|
||||
"bus-pingraow": "รถบัสปิ่นเกล้า",
|
||||
};
|
||||
|
||||
function labelFor(entityId: string): string {
|
||||
return SPONSOR_LABELS[entityId] ?? entityId;
|
||||
}
|
||||
|
||||
export async function Footer() {
|
||||
let sponsors: { entity_id: string; url_path: string }[] = [];
|
||||
try {
|
||||
const res = await api.images({ entity_type: "sponsor" });
|
||||
sponsors = res.items.map((item) => ({
|
||||
entity_id: item.entity_id,
|
||||
url_path: item.url_path,
|
||||
}));
|
||||
} catch {
|
||||
sponsors = [];
|
||||
}
|
||||
|
||||
export function Footer() {
|
||||
return (
|
||||
<footer className="footer">
|
||||
<div className="container">
|
||||
<div className="footer__grid">
|
||||
<div className="footer__brand">
|
||||
<div className="footer__brand-row">
|
||||
<Image src="/logo.svg" alt="AT Transit" width={48} height={48} />
|
||||
<Image src={LOGO} alt="Atroute" width={48} height={48} />
|
||||
<div>
|
||||
<strong>AT Transit</strong>
|
||||
<strong>Atroute</strong>
|
||||
<span>สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -77,10 +51,10 @@ export async function Footer() {
|
||||
|
||||
<div className="footer__col footer__contact">
|
||||
<h4>ติดต่อ</h4>
|
||||
<div className="row"><a href="tel:+66649639025">📞 +66 64 963 9025</a></div>
|
||||
<div className="row"><span>📍 ถนนเทศบาล 1 อ.เมือง อ่างทอง</span></div>
|
||||
<div className="row"><span>🕒 บริการ 04:30 - 21:00 น.</span></div>
|
||||
<div className="row"><a href="#">💬 LINE Official: @attransit</a></div>
|
||||
<div className="row"><a href="tel:+66649639025"><Icon name="phone" className="icon" /> 064 963 9025</a></div>
|
||||
<div className="row"><span><Icon name="map-pin" className="icon" /> ถนนเทศบาล 1 อ.เมือง อ่างทอง</span></div>
|
||||
<div className="row"><span><Icon name="clock" className="icon" /> บริการ 04:30 - 21:00 น.</span></div>
|
||||
<div className="row"><a href="#"><Icon name="message-circle" className="icon" /> LINE Official: @attransit</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -88,26 +62,21 @@ export async function Footer() {
|
||||
<h4>ผู้สนับสนุน & พาร์ทเนอร์</h4>
|
||||
<p className="lead">จองตั๋ว · สั่งของ · เช็กของฝาก ที่ร้านค้าและบริการพันธมิตรของเรา</p>
|
||||
<div className="sponsor-strip">
|
||||
{sponsors.length > 0 ? (
|
||||
sponsors.map((s) => (
|
||||
<a
|
||||
key={s.entity_id}
|
||||
className="sponsor-tile"
|
||||
href="#"
|
||||
aria-label={labelFor(s.entity_id)}
|
||||
title={labelFor(s.entity_id)}
|
||||
>
|
||||
<img src={resolveFileUrl(s.url_path)} alt={labelFor(s.entity_id)} loading="lazy" />
|
||||
</a>
|
||||
))
|
||||
) : (
|
||||
<span className="sponsor-tile sponsor-tile--empty">ยังไม่มีข้อมูลผู้สนับสนุน</span>
|
||||
)}
|
||||
{PARTNERS.map((p) => (
|
||||
<span
|
||||
key={p.id}
|
||||
className="sponsor-tile"
|
||||
aria-label={p.label}
|
||||
title={p.label}
|
||||
>
|
||||
<img src={p.src} alt={p.label} loading="lazy" />
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div className="footer__bottom">
|
||||
<p>© {new Date().getFullYear()} AT Transit <span className="pill">mockup template</span></p>
|
||||
<p>© {new Date().getFullYear()} Atroute <span className="pill">สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import Link from "next/link";
|
||||
import Image from "next/image";
|
||||
import { usePathname } from "next/navigation";
|
||||
import { LOGO } from "@/lib/images";
|
||||
|
||||
const links = [
|
||||
{ href: "/", label: "หน้าแรก" },
|
||||
@@ -19,15 +20,15 @@ export function Header() {
|
||||
<div className="topbar__inner">
|
||||
<Link href="/" className="brand">
|
||||
<Image
|
||||
src="/logo.svg"
|
||||
alt="AT Transit"
|
||||
src={LOGO}
|
||||
alt="Atroute"
|
||||
width={44}
|
||||
height={44}
|
||||
className="brand__logo"
|
||||
priority
|
||||
/>
|
||||
<div>
|
||||
<p className="brand__title">AT Transit</p>
|
||||
<p className="brand__title">Atroute</p>
|
||||
<p className="brand__subtitle">สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</p>
|
||||
</div>
|
||||
</Link>
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
/**
|
||||
* Lucide (MIT) icon set — inline SVG, mirroring the design repo's sprite
|
||||
* (`web-at-transit-mock/ui/index.html` `<symbol>` defs + a few additions).
|
||||
* Replaces the previous emoji "icons" (✨ ✅ 📞 📍 🕒 💬 🚌 🚏 …).
|
||||
*/
|
||||
import type { ReactNode, SVGProps } from "react";
|
||||
|
||||
export type IconName =
|
||||
| "bus"
|
||||
| "bus-front"
|
||||
| "map-pin"
|
||||
| "map"
|
||||
| "phone"
|
||||
| "message-circle"
|
||||
| "clock"
|
||||
| "search"
|
||||
| "globe"
|
||||
| "arrow-right"
|
||||
| "check"
|
||||
| "hourglass"
|
||||
| "camera"
|
||||
| "store";
|
||||
|
||||
const PATHS: Record<IconName, ReactNode> = {
|
||||
bus: (
|
||||
<>
|
||||
<path d="M8 6v6" />
|
||||
<path d="M15 6v6" />
|
||||
<path d="M2 12h19.6" />
|
||||
<path d="M18 18h3s.5-1.7.8-2.8c.1-.4.2-.8.2-1.2 0-.4-.1-.8-.2-1.2l-1.4-5C20.1 6.8 19.1 6 18 6H4a2 2 0 0 0-2 2v10h3" />
|
||||
<circle cx="7" cy="18" r="2" />
|
||||
<path d="M9 18h5" />
|
||||
<circle cx="16" cy="18" r="2" />
|
||||
</>
|
||||
),
|
||||
"bus-front": (
|
||||
<>
|
||||
<path d="M4 6 2 7" />
|
||||
<path d="M10 6h4" />
|
||||
<path d="m22 7-2-1" />
|
||||
<rect width="16" height="16" x="4" y="3" rx="2" />
|
||||
<path d="M4 11h16" />
|
||||
<path d="M8 15h.01" />
|
||||
<path d="M16 15h.01" />
|
||||
<path d="M6 19v2" />
|
||||
<path d="M18 21v-2" />
|
||||
</>
|
||||
),
|
||||
"map-pin": (
|
||||
<>
|
||||
<path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0" />
|
||||
<circle cx="12" cy="10" r="3" />
|
||||
</>
|
||||
),
|
||||
map: (
|
||||
<>
|
||||
<path d="M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z" />
|
||||
<path d="M15 5.764v15" />
|
||||
<path d="M9 3.236v15" />
|
||||
</>
|
||||
),
|
||||
phone: (
|
||||
<path d="M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384" />
|
||||
),
|
||||
"message-circle": (
|
||||
<path d="M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" />
|
||||
),
|
||||
clock: (
|
||||
<>
|
||||
<circle cx="12" cy="12" r="10" />
|
||||
<path d="M12 6v6l4 2" />
|
||||
</>
|
||||
),
|
||||
search: (
|
||||
<>
|
||||
<path d="m21 21-4.34-4.34" />
|
||||
<circle cx="11" cy="11" r="8" />
|
||||
</>
|
||||
),
|
||||
globe: (
|
||||
<>
|
||||
<circle cx="12" cy="12" r="10" />
|
||||
<path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" />
|
||||
<path d="M2 12h20" />
|
||||
</>
|
||||
),
|
||||
"arrow-right": (
|
||||
<>
|
||||
<path d="M5 12h14" />
|
||||
<path d="m12 5 7 7-7 7" />
|
||||
</>
|
||||
),
|
||||
check: <path d="M20 6 9 17l-5-5" />,
|
||||
hourglass: (
|
||||
<>
|
||||
<path d="M5 22h14" />
|
||||
<path d="M5 2h14" />
|
||||
<path d="M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22" />
|
||||
<path d="M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2" />
|
||||
</>
|
||||
),
|
||||
camera: (
|
||||
<>
|
||||
<path d="M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z" />
|
||||
<circle cx="12" cy="13" r="3" />
|
||||
</>
|
||||
),
|
||||
store: (
|
||||
<>
|
||||
<path d="m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7" />
|
||||
<path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8" />
|
||||
<path d="M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4" />
|
||||
<path d="M2 7h20" />
|
||||
<path d="M22 7v3a2 2 0 0 1-2 2 2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7" />
|
||||
</>
|
||||
),
|
||||
};
|
||||
|
||||
type Props = SVGProps<SVGSVGElement> & {
|
||||
name: IconName;
|
||||
size?: number;
|
||||
};
|
||||
|
||||
export function Icon({ name, size = 16, className, ...rest }: Props) {
|
||||
return (
|
||||
<svg
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth={2}
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
className={className}
|
||||
aria-hidden="true"
|
||||
{...rest}
|
||||
>
|
||||
{PATHS[name]}
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* Static design assets from `web-at-transit-mock/.image`
|
||||
* (copied to `frontend/public/images`).
|
||||
*
|
||||
* Every image resolves offline — no backend `/files` proxy needed for
|
||||
* brand/route/stop/partner visuals. Backend-uploaded images remain the
|
||||
* fallback only where the design has no matching asset.
|
||||
*/
|
||||
|
||||
const IMG = "/images";
|
||||
|
||||
/** Route vehicle/hero photos keyed by `route_id` (subset that exists in design). */
|
||||
const ROUTE_PHOTOS: Record<string, { hero?: string; car?: string }> = {
|
||||
"101": { hero: `${IMG}/routes/101/hero.jpeg`, car: `${IMG}/routes/101/car.jpeg` },
|
||||
"1011": { hero: `${IMG}/routes/1011/hero.jpeg`, car: `${IMG}/routes/1011/car.jpeg` },
|
||||
"15": { hero: `${IMG}/routes/15/hero.jpg`, car: `${IMG}/routes/15/car.jpg` },
|
||||
"2194": { car: `${IMG}/routes/2194/car.jpg` },
|
||||
"2231": { car: `${IMG}/routes/2231/car.jpg` },
|
||||
"324": { hero: `${IMG}/routes/324/hero.jpg`, car: `${IMG}/routes/324/car.jpg` },
|
||||
"464": { car: `${IMG}/routes/464/car.jpeg` },
|
||||
"641": { car: `${IMG}/routes/641/car.jpeg` },
|
||||
"902": { hero: `${IMG}/routes/902/hero.jpg`, car: `${IMG}/routes/902/car.jpg` },
|
||||
"951": { car: `${IMG}/routes/951/car.jpg` },
|
||||
"952": { hero: `${IMG}/routes/952/hero.webp`, car: `${IMG}/routes/952/car.webp` },
|
||||
};
|
||||
|
||||
/** Stop photos keyed by code (pad5 kilometer markers in the design). */
|
||||
const STOP_PHOTOS: Record<string, string> = {
|
||||
"36020": `${IMG}/stops/36020.jpg`,
|
||||
"39321": `${IMG}/stops/39321.jpg`,
|
||||
"42110": `${IMG}/stops/42110.jpg`,
|
||||
"42250": `${IMG}/stops/42250.jpg`,
|
||||
"54950": `${IMG}/stops/54950.jpg`,
|
||||
};
|
||||
|
||||
export const LOGO = `${IMG}/icons/minibus-512x512.png`;
|
||||
export const HERO_MAP = `${IMG}/network/overview-map.png`;
|
||||
|
||||
/** Partner / sponsor logos (footer + home marquee), from `.image/partners`. */
|
||||
export const PARTNERS: { id: string; label: string; src: string }[] = [
|
||||
{ id: "7-11", label: "7-Eleven", src: `${IMG}/partners/7-11.png` },
|
||||
{ id: "shopee", label: "Shopee", src: `${IMG}/partners/shopee.png` },
|
||||
{ id: "lazada", label: "Lazada", src: `${IMG}/partners/lazada.png` },
|
||||
{ id: "airasia-move", label: "airasia MOVE", src: `${IMG}/partners/airasia-move.png` },
|
||||
{ id: "busonlineticket", label: "busonlineticket", src: `${IMG}/partners/busonlineticket.png` },
|
||||
{ id: "trip", label: "Trip.com", src: `${IMG}/partners/trip.jpg` },
|
||||
{ id: "truck2hand", label: "truck2hand", src: `${IMG}/partners/truck2hand.png` },
|
||||
{ id: "tcl999-angthong", label: "ทีซีแอล 999 อ่างทอง", src: `${IMG}/partners/tcl999-angthong.jpg` },
|
||||
{ id: "bus-pingraow", label: "รถบัสปิ่นเกล้า", src: `${IMG}/partners/bus-pingraow.jpg` },
|
||||
];
|
||||
|
||||
/** Resolve a route photo URL (hero preferred, car as fallback). Returns null if none. */
|
||||
export function routePhoto(
|
||||
routeId: string,
|
||||
kind: "hero" | "car" = "car",
|
||||
): string | null {
|
||||
const p = ROUTE_PHOTOS[String(routeId)];
|
||||
if (!p) return null;
|
||||
if (kind === "hero") return p.hero ?? p.car ?? null;
|
||||
return p.car ?? p.hero ?? null;
|
||||
}
|
||||
|
||||
/** Resolve a stop photo URL by code. Returns null if the design has no asset. */
|
||||
export function stopPhoto(code: string): string | null {
|
||||
return STOP_PHOTOS[String(code)] ?? null;
|
||||
}
|
||||