พอร์ต UI จาก web-at-transit-mock เข้า Next.js + data sync เข้า Postgres/SeaweedFS
- 8 หน้า (home/stops/routes/stop/check/blog/about/credits) แปลง partials → React component ตรง mock
- ตรรกะพอร์ตเป็น src/lib/ui/*.ts (mount()) + runtime/PageRuntime
- CSS: base + pages/*.css import ต่อ route (คงลำดับ cascade ของ mock)
- asset/content: public/{image,resource/data,content,locales,vendor}
- แก้ path รูปไทล์พาร์ทเนอร์ (.image → /image) + fallback absolute
- ลบ UI เดิมที่ไม่ตรง mock (expanded/stops details/old components/globals.css)
- script/sync_data_to_postgres.mjs + sync_images_to_storage.mjs (dry-run/--apply, backup)
- docs/UI-PORT.md + DESIGN.md + README
This commit is contained in:
1 parent
24187fc3b7
commit
138a3d15d8
300 files changed
+20213
-1978
No files matched your search
@@ -0,0 +1,19 @@
|
||||
# ตารางกฎ "จุดนี้ = เวลาจุดอ้างอิง ± n นาที" (ใช้โดย resource/tools/derive-times.py)
|
||||
#
|
||||
# คอลัมน์: route_id, station_id, from_station_id, offset_min, note
|
||||
# route_id รหัสสาย (ตรงกับชื่อไฟล์ schedules<route_id>.json)
|
||||
# station_id จุดที่จะ "คำนวณ" (ต้องมีจุดนี้อยู่ในไฟล์ของสายแล้ว)
|
||||
# from_station_id จุดอ้างอิง (ต้องมี "เวลาจริง" อยู่ในไฟล์ของสาย — จะอยู่ทิศไหนก็ได้)
|
||||
# offset_min บวก/ลบ กี่นาที (+30 = หลังจุดอ้างอิง 30 นาที · -15 = ก่อนหน้า 15 นาที)
|
||||
# note หมายเหตุ (ไม่ใส่ก็ได้)
|
||||
#
|
||||
# วิธีใช้:
|
||||
# python resource/tools/derive-times.py --check → ดูว่าจะเปลี่ยนอะไร
|
||||
# python resource/tools/derive-times.py → เขียนไฟล์จริง
|
||||
# python resource/tools/derive-times.py --audit → ตรวจว่าไฟล์ตรงกับตารางไหม
|
||||
#
|
||||
# ⚠️ เว็บจะแสดงเวลาที่คำนวณเป็น "ชิปเส้นประ + ประมาณ" พร้อมข้อความ
|
||||
# "ตารางจากการคำนวณ (จาก <จุดอ้างอิง> +n นาที) — อาจเปลี่ยนแปลงตามการจราจรจริง" ให้อัตโนมัติ
|
||||
route_id,station_id,from_station_id,offset_min,note
|
||||
902,15,6,30,รอรถที่ 7-11 หน้ากินซ่า (รถจากจตุจักรผ่านมาถึง)
|
||||
951,5,6,30,ท่ารถตู้ต่างจังหวัด รังสิต (รถจากจตุจักรผ่านมาถึง)
|
||||
|
Can't render this file because it contains an unexpected character in line 1 and column 25.
|
Reference in new issue
Block a user