Files
web-at-transit-mock/README.md
T
phattaranun.a b2383ca7d0 Redesign #/check to match homepage design; drop home hero buttons; add README
- Rebuild checkSchedule.html to reuse index.html shell classes (gradient
  hero + blobs + gradient-text, summary stats, gradient stop-card headers)
- Remove View Route Details / Find Bus Stops / Preview a Route buttons and
  their i18n keys from the homepage hero
- Add check.* i18n keys (th/en) for the redesigned schedule page
- Add README.md with run instructions
2026-09-12 12:13:12 +07:00

2.7 KiB

web-at-transit-mock

Static HTML mockup / ดีไซน์ต้นแบบเว็บข้อมูลการเดินรถ — สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง (AT Transit)

repo นี้เป็น static HTML + vanilla JS (ไม่มี backend / framework / build step) ส่วน implementation จริง (Next.js) อยู่ที่ web-at-transit

โครงสร้าง

web-at-transit-mock/
├── maintheme.png               ← ภาพธีม/ดีไซน์ต้นแบบ
├── ui/                         ← Single-page app (hash router)
│   ├── index.html                  shell หน้าเดียว
│   ├── router.js / i18n.js / pwa.js / sw.js
│   ├── _shared.css / responsive.css
│   └── partials/                   view ละ 1 ไฟล์ (router fetch + inject)
└── resource/
    ├── data/                   ← ข้อมูล mock: routes.json, schedules.json, stations.json, ...
    └── images/                 ← รูปทั้งหมด

วิธี run

cd web-at-transit-mock
python3 -m http.server 8090

แล้วเปิดเบราว์เซอร์ที่:

http://localhost:8090/ui/index.html

เงื่อนไขสำคัญ

  1. ต้อง serve จาก root ของ repo (ไม่ใช่จาก ui/) — รูปและข้อมูลอ้างอิงด้วย relative path ../resource/... ถ้า serve ผิดตำแหน่ง path จะพัง
  2. ห้ามเปิด file:// — fetch JSON + relative path จะใช้ไม่ได้ ต้องผ่าน static server เสมอ
  3. เปลี่ยน port ได้โดยแก้เลข 8090 (เช่น python3 -m http.server 8080)

หมายเหตุ (ไม่ต้องแก้)

  • ui/index.html อ้าง ../../frontend-web-transit/web-transit/css/main-theme.css — ไฟล์นี้ไม่อยู่ใน repo (ดู AGENTS.md ข้อ 12) จะขึ้น 404 ใน DevTools แต่ไม่กระทบ การแสดงผล เพราะสไตล์จริงอยู่ที่ _shared.css
  • Google Fonts (fonts.googleapis.com) ต้องต่อเน็ต — ถ้า offline ฟอนต์จะ fallback เป็น system font แต่หน้าไม่พัง
  • รายละเอียดกฎการแก้โค้ดฉบับเต็ม ดูใน AGENTS.md และ DESIGN.md