diff --git a/.gitignore b/.gitignore index 8b3ddb8..c84eddd 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,16 @@ script/images *.jpeg *.sql !backend/migrations/*.sql -*.vps \ No newline at end of file +*.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 \ No newline at end of file diff --git a/frontend/public/fonts/k2d-300-latin-ext.woff2 b/frontend/public/fonts/k2d-300-latin-ext.woff2 new file mode 100644 index 0000000..ff7a301 Binary files /dev/null and b/frontend/public/fonts/k2d-300-latin-ext.woff2 differ diff --git a/frontend/public/fonts/k2d-300-latin.woff2 b/frontend/public/fonts/k2d-300-latin.woff2 new file mode 100644 index 0000000..839a0c3 Binary files /dev/null and b/frontend/public/fonts/k2d-300-latin.woff2 differ diff --git a/frontend/public/fonts/k2d-300-thai.woff2 b/frontend/public/fonts/k2d-300-thai.woff2 new file mode 100644 index 0000000..3e6509c Binary files /dev/null and b/frontend/public/fonts/k2d-300-thai.woff2 differ diff --git a/frontend/public/fonts/k2d-400-latin-ext.woff2 b/frontend/public/fonts/k2d-400-latin-ext.woff2 new file mode 100644 index 0000000..50c1784 Binary files /dev/null and b/frontend/public/fonts/k2d-400-latin-ext.woff2 differ diff --git a/frontend/public/fonts/k2d-400-latin.woff2 b/frontend/public/fonts/k2d-400-latin.woff2 new file mode 100644 index 0000000..68f4e9e Binary files /dev/null and b/frontend/public/fonts/k2d-400-latin.woff2 differ diff --git a/frontend/public/fonts/k2d-400-thai.woff2 b/frontend/public/fonts/k2d-400-thai.woff2 new file mode 100644 index 0000000..61fe798 Binary files /dev/null and b/frontend/public/fonts/k2d-400-thai.woff2 differ diff --git a/frontend/public/fonts/k2d-500-latin-ext.woff2 b/frontend/public/fonts/k2d-500-latin-ext.woff2 new file mode 100644 index 0000000..dbfca96 Binary files /dev/null and b/frontend/public/fonts/k2d-500-latin-ext.woff2 differ diff --git a/frontend/public/fonts/k2d-500-latin.woff2 b/frontend/public/fonts/k2d-500-latin.woff2 new file mode 100644 index 0000000..5b26f6a Binary files /dev/null and b/frontend/public/fonts/k2d-500-latin.woff2 differ diff --git a/frontend/public/fonts/k2d-500-thai.woff2 b/frontend/public/fonts/k2d-500-thai.woff2 new file mode 100644 index 0000000..363ffb5 Binary files /dev/null and b/frontend/public/fonts/k2d-500-thai.woff2 differ diff --git a/frontend/public/fonts/k2d-600-latin-ext.woff2 b/frontend/public/fonts/k2d-600-latin-ext.woff2 new file mode 100644 index 0000000..b8f20b8 Binary files /dev/null and b/frontend/public/fonts/k2d-600-latin-ext.woff2 differ diff --git a/frontend/public/fonts/k2d-600-latin.woff2 b/frontend/public/fonts/k2d-600-latin.woff2 new file mode 100644 index 0000000..677a435 Binary files /dev/null and b/frontend/public/fonts/k2d-600-latin.woff2 differ diff --git a/frontend/public/fonts/k2d-600-thai.woff2 b/frontend/public/fonts/k2d-600-thai.woff2 new file mode 100644 index 0000000..2214eec Binary files /dev/null and b/frontend/public/fonts/k2d-600-thai.woff2 differ diff --git a/frontend/public/fonts/k2d-700-latin-ext.woff2 b/frontend/public/fonts/k2d-700-latin-ext.woff2 new file mode 100644 index 0000000..b0da5f8 Binary files /dev/null and b/frontend/public/fonts/k2d-700-latin-ext.woff2 differ diff --git a/frontend/public/fonts/k2d-700-latin.woff2 b/frontend/public/fonts/k2d-700-latin.woff2 new file mode 100644 index 0000000..b44ff05 Binary files /dev/null and b/frontend/public/fonts/k2d-700-latin.woff2 differ diff --git a/frontend/public/fonts/k2d-700-thai.woff2 b/frontend/public/fonts/k2d-700-thai.woff2 new file mode 100644 index 0000000..b6d29c9 Binary files /dev/null and b/frontend/public/fonts/k2d-700-thai.woff2 differ diff --git a/frontend/public/fonts/k2d-800-latin-ext.woff2 b/frontend/public/fonts/k2d-800-latin-ext.woff2 new file mode 100644 index 0000000..bd0a205 Binary files /dev/null and b/frontend/public/fonts/k2d-800-latin-ext.woff2 differ diff --git a/frontend/public/fonts/k2d-800-latin.woff2 b/frontend/public/fonts/k2d-800-latin.woff2 new file mode 100644 index 0000000..637ae15 Binary files /dev/null and b/frontend/public/fonts/k2d-800-latin.woff2 differ diff --git a/frontend/public/fonts/k2d-800-thai.woff2 b/frontend/public/fonts/k2d-800-thai.woff2 new file mode 100644 index 0000000..ee74a3c Binary files /dev/null and b/frontend/public/fonts/k2d-800-thai.woff2 differ diff --git a/frontend/public/fonts/k2d.css b/frontend/public/fonts/k2d.css new file mode 100644 index 0000000..e1cb963 --- /dev/null +++ b/frontend/public/fonts/k2d.css @@ -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; +} diff --git a/frontend/public/images/extras/boat-market2transta.jpg b/frontend/public/images/extras/boat-market2transta.jpg new file mode 100644 index 0000000..74c7291 Binary files /dev/null and b/frontend/public/images/extras/boat-market2transta.jpg differ diff --git a/frontend/public/images/extras/boat.jpeg b/frontend/public/images/extras/boat.jpeg new file mode 100644 index 0000000..be57062 Binary files /dev/null and b/frontend/public/images/extras/boat.jpeg differ diff --git a/frontend/public/images/icons/lucide/alarm-clock.svg b/frontend/public/images/icons/lucide/alarm-clock.svg new file mode 100644 index 0000000..0f99686 --- /dev/null +++ b/frontend/public/images/icons/lucide/alarm-clock.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/frontend/public/images/icons/lucide/arrow-right.svg b/frontend/public/images/icons/lucide/arrow-right.svg new file mode 100644 index 0000000..433ded3 --- /dev/null +++ b/frontend/public/images/icons/lucide/arrow-right.svg @@ -0,0 +1,14 @@ + + + + diff --git a/frontend/public/images/icons/lucide/bus-front.svg b/frontend/public/images/icons/lucide/bus-front.svg new file mode 100644 index 0000000..749aeec --- /dev/null +++ b/frontend/public/images/icons/lucide/bus-front.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + diff --git a/frontend/public/images/icons/lucide/bus.svg b/frontend/public/images/icons/lucide/bus.svg new file mode 100644 index 0000000..9fdef2d --- /dev/null +++ b/frontend/public/images/icons/lucide/bus.svg @@ -0,0 +1,19 @@ + + + + + + + + + diff --git a/frontend/public/images/icons/lucide/check.svg b/frontend/public/images/icons/lucide/check.svg new file mode 100644 index 0000000..5abe152 --- /dev/null +++ b/frontend/public/images/icons/lucide/check.svg @@ -0,0 +1,13 @@ + + + diff --git a/frontend/public/images/icons/lucide/clock.svg b/frontend/public/images/icons/lucide/clock.svg new file mode 100644 index 0000000..b6ae283 --- /dev/null +++ b/frontend/public/images/icons/lucide/clock.svg @@ -0,0 +1,14 @@ + + + + diff --git a/frontend/public/images/icons/lucide/globe.svg b/frontend/public/images/icons/lucide/globe.svg new file mode 100644 index 0000000..53c80ee --- /dev/null +++ b/frontend/public/images/icons/lucide/globe.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/frontend/public/images/icons/lucide/hourglass.svg b/frontend/public/images/icons/lucide/hourglass.svg new file mode 100644 index 0000000..97a2081 --- /dev/null +++ b/frontend/public/images/icons/lucide/hourglass.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/frontend/public/images/icons/lucide/map-pin.svg b/frontend/public/images/icons/lucide/map-pin.svg new file mode 100644 index 0000000..5d73fbd --- /dev/null +++ b/frontend/public/images/icons/lucide/map-pin.svg @@ -0,0 +1,14 @@ + + + + diff --git a/frontend/public/images/icons/lucide/map.svg b/frontend/public/images/icons/lucide/map.svg new file mode 100644 index 0000000..8a85256 --- /dev/null +++ b/frontend/public/images/icons/lucide/map.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/frontend/public/images/icons/lucide/message-circle.svg b/frontend/public/images/icons/lucide/message-circle.svg new file mode 100644 index 0000000..d269b8b --- /dev/null +++ b/frontend/public/images/icons/lucide/message-circle.svg @@ -0,0 +1,13 @@ + + + diff --git a/frontend/public/images/icons/lucide/phone.svg b/frontend/public/images/icons/lucide/phone.svg new file mode 100644 index 0000000..dc81f59 --- /dev/null +++ b/frontend/public/images/icons/lucide/phone.svg @@ -0,0 +1,13 @@ + + + diff --git a/frontend/public/images/icons/lucide/refresh-cw.svg b/frontend/public/images/icons/lucide/refresh-cw.svg new file mode 100644 index 0000000..c27b3a9 --- /dev/null +++ b/frontend/public/images/icons/lucide/refresh-cw.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/frontend/public/images/icons/lucide/search.svg b/frontend/public/images/icons/lucide/search.svg new file mode 100644 index 0000000..03e442a --- /dev/null +++ b/frontend/public/images/icons/lucide/search.svg @@ -0,0 +1,14 @@ + + + + diff --git a/frontend/public/images/icons/lucide/triangle-alert.svg b/frontend/public/images/icons/lucide/triangle-alert.svg new file mode 100644 index 0000000..3232fb0 --- /dev/null +++ b/frontend/public/images/icons/lucide/triangle-alert.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/frontend/public/images/icons/minibus-192x192.png b/frontend/public/images/icons/minibus-192x192.png new file mode 100644 index 0000000..35a3fda Binary files /dev/null and b/frontend/public/images/icons/minibus-192x192.png differ diff --git a/frontend/public/images/icons/minibus-256x256.ico b/frontend/public/images/icons/minibus-256x256.ico new file mode 100644 index 0000000..61443f4 Binary files /dev/null and b/frontend/public/images/icons/minibus-256x256.ico differ diff --git a/frontend/public/images/icons/minibus-512x512.png b/frontend/public/images/icons/minibus-512x512.png new file mode 100644 index 0000000..46855f2 Binary files /dev/null and b/frontend/public/images/icons/minibus-512x512.png differ diff --git a/frontend/public/images/icons/minibus-maskable-512x512.png b/frontend/public/images/icons/minibus-maskable-512x512.png new file mode 100644 index 0000000..1fd3ea3 Binary files /dev/null and b/frontend/public/images/icons/minibus-maskable-512x512.png differ diff --git a/frontend/public/images/landmarks/market.png b/frontend/public/images/landmarks/market.png new file mode 100644 index 0000000..9105698 Binary files /dev/null and b/frontend/public/images/landmarks/market.png differ diff --git a/frontend/public/images/landmarks/riverbank.jpg b/frontend/public/images/landmarks/riverbank.jpg new file mode 100644 index 0000000..ff936a4 Binary files /dev/null and b/frontend/public/images/landmarks/riverbank.jpg differ diff --git a/frontend/public/images/landmarks/temple.png b/frontend/public/images/landmarks/temple.png new file mode 100644 index 0000000..619b3b5 Binary files /dev/null and b/frontend/public/images/landmarks/temple.png differ diff --git a/frontend/public/images/landmarks/waterpark.png b/frontend/public/images/landmarks/waterpark.png new file mode 100644 index 0000000..7e7b8b2 Binary files /dev/null and b/frontend/public/images/landmarks/waterpark.png differ diff --git a/frontend/public/images/network/overview-map.png b/frontend/public/images/network/overview-map.png new file mode 100644 index 0000000..a2c9b71 Binary files /dev/null and b/frontend/public/images/network/overview-map.png differ diff --git a/frontend/public/images/partners/7-11.png b/frontend/public/images/partners/7-11.png new file mode 100644 index 0000000..19c8f15 Binary files /dev/null and b/frontend/public/images/partners/7-11.png differ diff --git a/frontend/public/images/partners/airasia-move.png b/frontend/public/images/partners/airasia-move.png new file mode 100644 index 0000000..54f0f55 Binary files /dev/null and b/frontend/public/images/partners/airasia-move.png differ diff --git a/frontend/public/images/partners/bus-pingraow.jpg b/frontend/public/images/partners/bus-pingraow.jpg new file mode 100644 index 0000000..0b87375 Binary files /dev/null and b/frontend/public/images/partners/bus-pingraow.jpg differ diff --git a/frontend/public/images/partners/busonlineticket.png b/frontend/public/images/partners/busonlineticket.png new file mode 100644 index 0000000..4e0ff2d Binary files /dev/null and b/frontend/public/images/partners/busonlineticket.png differ diff --git a/frontend/public/images/partners/lazada.png b/frontend/public/images/partners/lazada.png new file mode 100644 index 0000000..ccf1a2f Binary files /dev/null and b/frontend/public/images/partners/lazada.png differ diff --git a/frontend/public/images/partners/shopee.png b/frontend/public/images/partners/shopee.png new file mode 100644 index 0000000..0d123b9 Binary files /dev/null and b/frontend/public/images/partners/shopee.png differ diff --git a/frontend/public/images/partners/tcl999-angthong.jpg b/frontend/public/images/partners/tcl999-angthong.jpg new file mode 100644 index 0000000..e836852 Binary files /dev/null and b/frontend/public/images/partners/tcl999-angthong.jpg differ diff --git a/frontend/public/images/partners/trip.jpg b/frontend/public/images/partners/trip.jpg new file mode 100644 index 0000000..aa98af9 Binary files /dev/null and b/frontend/public/images/partners/trip.jpg differ diff --git a/frontend/public/images/partners/truck2hand.png b/frontend/public/images/partners/truck2hand.png new file mode 100644 index 0000000..dca8117 Binary files /dev/null and b/frontend/public/images/partners/truck2hand.png differ diff --git a/frontend/public/images/qrcode/101.png b/frontend/public/images/qrcode/101.png new file mode 100644 index 0000000..605ca65 Binary files /dev/null and b/frontend/public/images/qrcode/101.png differ diff --git a/frontend/public/images/qrcode/15.JPG b/frontend/public/images/qrcode/15.JPG new file mode 100644 index 0000000..5dd2984 Binary files /dev/null and b/frontend/public/images/qrcode/15.JPG differ diff --git a/frontend/public/images/qrcode/464.jpeg b/frontend/public/images/qrcode/464.jpeg new file mode 100644 index 0000000..a45f0d2 Binary files /dev/null and b/frontend/public/images/qrcode/464.jpeg differ diff --git a/frontend/public/images/qrcode/902.png b/frontend/public/images/qrcode/902.png new file mode 100644 index 0000000..7294b61 Binary files /dev/null and b/frontend/public/images/qrcode/902.png differ diff --git a/frontend/public/images/routes/101/car.jpeg b/frontend/public/images/routes/101/car.jpeg new file mode 100644 index 0000000..eaa6d8e Binary files /dev/null and b/frontend/public/images/routes/101/car.jpeg differ diff --git a/frontend/public/images/routes/101/hero.jpeg b/frontend/public/images/routes/101/hero.jpeg new file mode 100644 index 0000000..acfe305 Binary files /dev/null and b/frontend/public/images/routes/101/hero.jpeg differ diff --git a/frontend/public/images/routes/1011/car.jpeg b/frontend/public/images/routes/1011/car.jpeg new file mode 100644 index 0000000..b87cfb8 Binary files /dev/null and b/frontend/public/images/routes/1011/car.jpeg differ diff --git a/frontend/public/images/routes/1011/hero.jpeg b/frontend/public/images/routes/1011/hero.jpeg new file mode 100644 index 0000000..b87cfb8 Binary files /dev/null and b/frontend/public/images/routes/1011/hero.jpeg differ diff --git a/frontend/public/images/routes/15/car.jpg b/frontend/public/images/routes/15/car.jpg new file mode 100644 index 0000000..2083c8c Binary files /dev/null and b/frontend/public/images/routes/15/car.jpg differ diff --git a/frontend/public/images/routes/15/hero.jpg b/frontend/public/images/routes/15/hero.jpg new file mode 100644 index 0000000..08f99a9 Binary files /dev/null and b/frontend/public/images/routes/15/hero.jpg differ diff --git a/frontend/public/images/routes/2194/car.jpg b/frontend/public/images/routes/2194/car.jpg new file mode 100644 index 0000000..1e0008a Binary files /dev/null and b/frontend/public/images/routes/2194/car.jpg differ diff --git a/frontend/public/images/routes/2231/car.jpg b/frontend/public/images/routes/2231/car.jpg new file mode 100644 index 0000000..51d5fe7 Binary files /dev/null and b/frontend/public/images/routes/2231/car.jpg differ diff --git a/frontend/public/images/routes/324/car.jpg b/frontend/public/images/routes/324/car.jpg new file mode 100644 index 0000000..74e8e26 Binary files /dev/null and b/frontend/public/images/routes/324/car.jpg differ diff --git a/frontend/public/images/routes/324/hero.jpg b/frontend/public/images/routes/324/hero.jpg new file mode 100644 index 0000000..74e8e26 Binary files /dev/null and b/frontend/public/images/routes/324/hero.jpg differ diff --git a/frontend/public/images/routes/464/car.jpeg b/frontend/public/images/routes/464/car.jpeg new file mode 100644 index 0000000..7df8a0a Binary files /dev/null and b/frontend/public/images/routes/464/car.jpeg differ diff --git a/frontend/public/images/routes/641/car.jpeg b/frontend/public/images/routes/641/car.jpeg new file mode 100644 index 0000000..c33e19d Binary files /dev/null and b/frontend/public/images/routes/641/car.jpeg differ diff --git a/frontend/public/images/routes/902/car.jpg b/frontend/public/images/routes/902/car.jpg new file mode 100644 index 0000000..02ea3c9 Binary files /dev/null and b/frontend/public/images/routes/902/car.jpg differ diff --git a/frontend/public/images/routes/902/hero.jpg b/frontend/public/images/routes/902/hero.jpg new file mode 100644 index 0000000..02ea3c9 Binary files /dev/null and b/frontend/public/images/routes/902/hero.jpg differ diff --git a/frontend/public/images/routes/951/car.jpg b/frontend/public/images/routes/951/car.jpg new file mode 100644 index 0000000..b3b4e56 Binary files /dev/null and b/frontend/public/images/routes/951/car.jpg differ diff --git a/frontend/public/images/routes/952/car.jpg b/frontend/public/images/routes/952/car.jpg new file mode 100644 index 0000000..032161d Binary files /dev/null and b/frontend/public/images/routes/952/car.jpg differ diff --git a/frontend/public/images/routes/952/car.webp b/frontend/public/images/routes/952/car.webp new file mode 100644 index 0000000..d66e876 Binary files /dev/null and b/frontend/public/images/routes/952/car.webp differ diff --git a/frontend/public/images/routes/952/hero.webp b/frontend/public/images/routes/952/hero.webp new file mode 100644 index 0000000..d66e876 Binary files /dev/null and b/frontend/public/images/routes/952/hero.webp differ diff --git a/frontend/public/images/stops/36020.jpg b/frontend/public/images/stops/36020.jpg new file mode 100644 index 0000000..4248ed3 Binary files /dev/null and b/frontend/public/images/stops/36020.jpg differ diff --git a/frontend/public/images/stops/39321.jpg b/frontend/public/images/stops/39321.jpg new file mode 100644 index 0000000..3881f88 Binary files /dev/null and b/frontend/public/images/stops/39321.jpg differ diff --git a/frontend/public/images/stops/42110.jpg b/frontend/public/images/stops/42110.jpg new file mode 100644 index 0000000..82a7bb4 Binary files /dev/null and b/frontend/public/images/stops/42110.jpg differ diff --git a/frontend/public/images/stops/42250.jpg b/frontend/public/images/stops/42250.jpg new file mode 100644 index 0000000..e282daa Binary files /dev/null and b/frontend/public/images/stops/42250.jpg differ diff --git a/frontend/public/images/stops/54950.jpg b/frontend/public/images/stops/54950.jpg new file mode 100644 index 0000000..bfe68d9 Binary files /dev/null and b/frontend/public/images/stops/54950.jpg differ diff --git a/frontend/public/logo.svg b/frontend/public/logo.svg deleted file mode 100644 index 76b45a9..0000000 --- a/frontend/public/logo.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/frontend/src/app/apple-icon.png b/frontend/src/app/apple-icon.png new file mode 100644 index 0000000..35a3fda Binary files /dev/null and b/frontend/src/app/apple-icon.png differ diff --git a/frontend/src/app/favicon.ico b/frontend/src/app/favicon.ico new file mode 100644 index 0000000..61443f4 Binary files /dev/null and b/frontend/src/app/favicon.ico differ diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css index 7d2e8c7..adf5ec9 100644 --- a/frontend/src/app/globals.css +++ b/frontend/src/app/globals.css @@ -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; +} + + diff --git a/frontend/src/app/icon.png b/frontend/src/app/icon.png new file mode 100644 index 0000000..46855f2 Binary files /dev/null and b/frontend/src/app/icon.png differ diff --git a/frontend/src/app/icon.svg b/frontend/src/app/icon.svg deleted file mode 100644 index 76b45a9..0000000 --- a/frontend/src/app/icon.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/frontend/src/app/layout.tsx b/frontend/src/app/layout.tsx index d4d66dd..8d76b5b 100644 --- a/frontend/src/app/layout.tsx +++ b/frontend/src/app/layout.tsx @@ -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 ( + {/* K2D (offline, local woff2 — ตรงกับ design) + Noto/Prompt fallback (CDN) */} + = { @@ -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 ( <>
+ {/* แผนที่เครือข่าย (จาก design: .image/network/overview-map.png) */} +
- ✨ ยินดีต้อนรับ + ยินดีต้อนรับ

สถานีขนส่งผู้โดยสารภายใน
@@ -83,6 +90,23 @@ export default async function HomePage() {

+ {/* ผู้สนับสนุน & พาร์ทเนอร์ (marquee — จาก design) */} +
+
+

ผู้สนับสนุน & พาร์ทเนอร์

+

ร่วมเป็นผู้สนับสนุนเราได้ เมื่อซื้อของออนไลน์ หรือซื้อตั๋วรถทัวร์ เครื่องบิน ออนไลน์

+
+
+
+ {marqueePartners.map((p, i) => ( + + {p.label} + + ))} +
+
+
+
{orderedGroups.map((g) => { @@ -110,7 +134,7 @@ export default async function HomePage() {

{r.name_th}

- ✅ ดูตาราง + ดูตาราง
diff --git a/frontend/src/app/routes/[routeId]/page.tsx b/frontend/src/app/routes/[routeId]/page.tsx index 2e985c7..c079df9 100644 --- a/frontend/src/app/routes/[routeId]/page.tsx +++ b/frontend/src/app/routes/[routeId]/page.tsx @@ -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//car|hero) + const photo = routePhoto(route.route_id, "car") ?? routePhoto(route.route_id, "hero"); + return (
@@ -159,6 +164,13 @@ export default async function RouteDetailPage({ + {photo && ( +
+

รถประจำสาย

+ {`รถของสาย +
+ )} +

เส้นทางวิ่ง

@@ -208,7 +220,7 @@ export default async function RouteDetailPage({ {s.station_type} {(s.city_th || s.province_th) && ( - 📍 {[s.city_th, s.province_th].filter(Boolean).join(" · ")} + {[s.city_th, s.province_th].filter(Boolean).join(" · ")} )} {!hasCoord && ( @@ -253,7 +265,7 @@ export default async function RouteDetailPage({ ) : (
{s.departure_times.map((t, j) => ( - 🕒 {t} + {t} ))}
)} diff --git a/frontend/src/app/routes/page.tsx b/frontend/src/app/routes/page.tsx index f992a18..9ce3122 100644 --- a/frontend/src/app/routes/page.tsx +++ b/frontend/src/app/routes/page.tsx @@ -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 })
- 🛣️ ROUTE NETWORK + ROUTE NETWORK

เส้นทางเดินรถทั้งหมด

@@ -50,7 +51,7 @@ export default async function RoutesPage({ searchParams }: { searchParams: SP })
- 🔍 +
@@ -81,7 +82,7 @@ export default async function RoutesPage({ searchParams }: { searchParams: SP }) {r.route_group_label_th || r.route_group_code} - 🚌 {r.vehicle_type} + {r.vehicle_type}
→ diff --git a/frontend/src/app/stops/details/page.tsx b/frontend/src/app/stops/details/page.tsx index 28f3444..111c1e8 100644 --- a/frontend/src/app/stops/details/page.tsx +++ b/frontend/src/app/stops/details/page.tsx @@ -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/.jpg) — สำคัญกว่า backend images + const designPhoto = stopPhoto(stop.code); + return (
{stop.station_type}

{stop.name_th}

-

📍 {place}{hasMap ? ` · ${stop.lat?.toFixed(4)}, ${stop.lng?.toFixed(4)}` : ""}

+

{place}{hasMap ? ` · ${stop.lat?.toFixed(4)}, ${stop.lng?.toFixed(4)}` : ""}

- {stop.images.length > 0 ? ( + {designPhoto ? ( +
+ {stop.name_th} +
+ ) : stop.images.length > 0 ? (
) : (
-
📷 ยังไม่มีรูปป้ายนี้
+
ยังไม่มีรูปป้ายนี้
)} {hasMap ? ( @@ -81,7 +90,7 @@ export default async function StopDetailsPage({ searchParams }: StopDetailsPageP
) : (
-
🗺️ ยังไม่มีพิกัดของป้ายนี้
+
ยังไม่มีพิกัดของป้ายนี้
)}
@@ -105,11 +114,11 @@ export default async function StopDetailsPage({ searchParams }: StopDetailsPageP
- 🧭 + {s.direction_note || "ไม่ระบุทิศทาง"} {s.schedule_note && ( - 📝 {s.schedule_note} + {s.schedule_note} )}
@@ -118,7 +127,7 @@ export default async function StopDetailsPage({ searchParams }: StopDetailsPageP — ยังไม่มีรอบ — ) : ( s.departure_times.map((t, j) => ( - 🕒 {t} + {t} )) )}
diff --git a/frontend/src/app/stops/page.tsx b/frontend/src/app/stops/page.tsx index 51a7e60..d11d741 100644 --- a/frontend/src/app/stops/page.tsx +++ b/frontend/src/app/stops/page.tsx @@ -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 = { @@ -11,12 +12,12 @@ const TYPE_TONE: Record = { market: "pink", landmark: "mint", }; -const TYPE_ICON: Record = { - terminal: "🚍", - station: "🚏", - pickup: "🛣️", - market: "🏪", - landmark: "📍", +const TYPE_ICON: Record = { + terminal: "bus-front", + station: "map-pin", + pickup: "bus", + market: "store", + landmark: "map-pin", }; const TYPE_LABEL: Record = { terminal: "สถานีขนส่ง", @@ -44,7 +45,7 @@ export default async function StopsPage() {
- 🚏 STOP DIRECTORY + STOP DIRECTORY

จุดจอดทั่วประเทศ

@@ -67,13 +68,13 @@ export default async function StopsPage() {
- 🔍 +
{Object.entries(typeCounts).map(([t, n]) => ( - {TYPE_ICON[t] ?? "📍"} {TYPE_LABEL[t] ?? t} · {n} + {TYPE_LABEL[t] ?? t} · {n} ))}
@@ -82,7 +83,7 @@ export default async function StopsPage() {
{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}`} >
- {icon} +

{s.name_th}

@@ -103,7 +104,7 @@ export default async function StopsPage() { {TYPE_LABEL[s.station_type] ?? s.station_type} {s.lat != null && s.lng != null && ( - 📍 บนแผนที่ + บนแผนที่ )}
@@ -112,7 +113,7 @@ export default async function StopsPage() { ) : (
- {icon} +

{s.name_th}

@@ -122,7 +123,7 @@ export default async function StopsPage() { {TYPE_LABEL[s.station_type] ?? s.station_type} {s.lat != null && s.lng != null && ( - 📍 บนแผนที่ + บนแผนที่ )}
diff --git a/frontend/src/components/Footer.tsx b/frontend/src/components/Footer.tsx index 362f1c2..a04e06e 100644 --- a/frontend/src/components/Footer.tsx +++ b/frontend/src/components/Footer.tsx @@ -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 = { - "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 (
- AT Transit + Atroute
- AT Transit + Atroute สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง
@@ -77,10 +51,10 @@ export async function Footer() {

ติดต่อ

- -
📍 ถนนเทศบาล 1 อ.เมือง อ่างทอง
-
🕒 บริการ 04:30 - 21:00 น.
- + +
ถนนเทศบาล 1 อ.เมือง อ่างทอง
+
บริการ 04:30 - 21:00 น.
+
@@ -88,26 +62,21 @@ export async function Footer() {

ผู้สนับสนุน & พาร์ทเนอร์

จองตั๋ว · สั่งของ · เช็กของฝาก ที่ร้านค้าและบริการพันธมิตรของเรา

- {sponsors.length > 0 ? ( - sponsors.map((s) => ( - - {labelFor(s.entity_id)} - - )) - ) : ( - ยังไม่มีข้อมูลผู้สนับสนุน - )} + {PARTNERS.map((p) => ( + + {p.label} + + ))}
-

© {new Date().getFullYear()} AT Transit mockup template

+

© {new Date().getFullYear()} Atroute สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง

diff --git a/frontend/src/components/Header.tsx b/frontend/src/components/Header.tsx index 9205f2f..0356de6 100644 --- a/frontend/src/components/Header.tsx +++ b/frontend/src/components/Header.tsx @@ -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() {
AT Transit
-

AT Transit

+

Atroute

สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง

diff --git a/frontend/src/components/Icons.tsx b/frontend/src/components/Icons.tsx new file mode 100644 index 0000000..12be6ea --- /dev/null +++ b/frontend/src/components/Icons.tsx @@ -0,0 +1,142 @@ +/** + * Lucide (MIT) icon set — inline SVG, mirroring the design repo's sprite + * (`web-at-transit-mock/ui/index.html` `` 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 = { + bus: ( + <> + + + + + + + + + ), + "bus-front": ( + <> + + + + + + + + + + + ), + "map-pin": ( + <> + + + + ), + map: ( + <> + + + + + ), + phone: ( + + ), + "message-circle": ( + + ), + clock: ( + <> + + + + ), + search: ( + <> + + + + ), + globe: ( + <> + + + + + ), + "arrow-right": ( + <> + + + + ), + check: , + hourglass: ( + <> + + + + + + ), + camera: ( + <> + + + + ), + store: ( + <> + + + + + + + ), +}; + +type Props = SVGProps & { + name: IconName; + size?: number; +}; + +export function Icon({ name, size = 16, className, ...rest }: Props) { + return ( + + ); +} diff --git a/frontend/src/lib/images.ts b/frontend/src/lib/images.ts new file mode 100644 index 0000000..8200398 --- /dev/null +++ b/frontend/src/lib/images.ts @@ -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 = { + "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 = { + "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; +}