diff --git a/.env.example b/.env.example index cc5c2e0..362cbb0 100644 --- a/.env.example +++ b/.env.example @@ -2,6 +2,8 @@ # All runtime vars are centralized here at the repository root. # shared app defaults +# Postgres + SeaweedFS รันจาก D:\Git\core_management +# (compose.internal.db.yaml / compose.storage.yaml) — network: internal-network NEXT_PUBLIC_API_BASE=/api NEXT_PUBLIC_FILES_BASE=/files INTERNAL_API_BASE=http://at-transit-backend:18080/api diff --git a/.gitignore b/.gitignore index 8b3ddb8..20e8842 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,11 @@ script/images *.jpeg *.sql !backend/migrations/*.sql -*.vps \ No newline at end of file +*.vps + +# UI assets พอร์ตมาจาก web-at-transit-mock (ยกเว้นกฎ *.png/*.jpg ด้านบน) +!frontend/public/image/** +!frontend/public/content/** + +# local agent cache +.hermes/ diff --git a/DESIGN.md b/DESIGN.md new file mode 100644 index 0000000..b76eef5 --- /dev/null +++ b/DESIGN.md @@ -0,0 +1,228 @@ +# DESIGN.md — เอกลักษณ์งานออกแบบ Atroute + +> **ขอบเขต:** ใช้กับ UI ใน `frontend/` (Next.js App Router) ซึ่งพอร์ตมาจาก mock +> (`D:\Git\workspace\web-at-transit-mock`) แบบ 1:1 — mock คือแหล่งความจริงของดีไซน์ +> AI agent ต้องอ่านไฟล์นี้ก่อนแก้ UI ทุกครั้ง และห้ามฝ่าฝืนกฎ "ห้ามทำ" + +--- + +## 1. เอกลักษณ์ (Design Signature) + +**Concept: "ขาวไล่ม่วง" (White-to-Purple)** — พื้นขาวสะอาด มีม่วงเฉดเดียวเป็นตัวชูโรง + +หัวใจคือ **ม่วงหนึ่งเฉด + ความนิ่งของตัวพิมพ์** ไม่ใช่การไล่สีรุ้งแบบ template: +ม่วง `#7a4cc0` ถูกใช้อย่างตั้งใจ (ปุ่ม / CTA / รหัสป้าย / แอคเซนต์) บนพื้นขาวที่ไล่ +ไปม่วงจาง ๆ แทบไม่เห็น เพื่อให้ข้อมูลอ่านง่ายและไม่แย่งความสนใจ + +สามเสาหลัก: + +1. **ข้อมูลต้องอ่านได้ชัดเจน** — ตัวเลข/รหัสใช้ฟอนต์ mono + tabular-nums เรียงตรงกัน +2. **ม่วงหนึ่งเฉด มีเหตุผล** — ม่วง = แบรนด์/แอคเซนต์, ไม่ใช่สีสุ่ม 5 เฉดไร้ความหมาย +3. **สี = ภาษาสถานะ** — เขียว = มีรอบ, แดง = ออกแล้ว, เทา = ไม่มีข้อมูล ไม่ใช่ของตกแต่ง + +--- + +## 2. กฎ "ห้ามทำ" (ฉีกสไตล์ AI slop) + +รายการนี้คือลายเซ็นของเว็บ AI ยุค 2024–2025 — **ห้าม** ใช้เด็ดขาด: + +| # | ห้าม | เพราะ | +|---|---|---| +| 1 | ❌ **Aurora gradient หลายสี** (ม่วง→ชมพู→ฟ้า→เขียว ผสมกันแนวทแยง) | ลายเซ็น AI อันดับหนึ่ง | +| 2 | ❌ **ม่วงสุ่ม 5+ เฉด** ไม่มีความหมาย (ม่วง 50/100/200/…/900 หว่านเต็มหน้า) | ยึดม่วงเฉดเดียว `#7a4cc0` + อ่อน `#b07ce0` | +| 3 | ❌ Glassmorphism (`backdrop-filter: blur`) | ใช้เฉพาะแถบนำทางที่จำเป็นจริง ๆ | +| 4 | ❌ **Emoji เป็น icon** (🚏🕒📍🛣️🧭) | ใช้ SVG icon หรือ glyph ตัวพิมพ์ | +| 5 | ❌ Blob / รูปทรงออร์แกนิกลอย ๆ เป็นพื้นหลัง | ใช้เส้นขอบ/ตาราง/ลวดลายเรขาคณิต | +| 6 | ❌ การ์ดมน ๆ พื้นสีพาสเทล รัศมี 16–22px | ใช้เส้นขอบ 1px + `radius: 8px` ไม่ใช่สีพื้น+เงา | +| 7 | ❌ Badge "✨ ยินดีต้อนรับ", sparkle, star | ไร้สาระ ไม่ได้ให้ข้อมูล | +| 8 | ❌ Drop shadow ทั่วหน้า | แบ่งองค์ประกอบด้วย border + whitespace | +| 9 | ❌ ฟอนต์แฟนซี/display เกินจำเป็น | ใช้ระบบฟอนต์เดียวตลอด (ดูหัวข้อ 4) | +| 10 | ❌ คำว่า "template / mockup / demo" ใน UI | โปรเจกต์จริง ไม่ใช่ template | +| 11 | ❌ ตัวหนังสือ gradient (text-clip) บนพื้นอ่อน | ตัวหนังสือสีทึบ ตรง ไม่มี gradient | + +> ตรวจงานก่อนส่งทุกครั้ง: ถ้าเห็นรายการข้างต้นในโค้ด/ดีไซน์ = แก้ก่อน merge + +--- + +## 3. โทเคนสี (ใช้ค่าที่กำหนดเท่านั้น — ห้ามคิดเลขใหม่เอง) + +```css +:root { + /* ม่วง — สีหลักเฉดเดียวของแบรนด์ */ + --purple-700: #6d28d9; /* ม่วงเข้ม — hover / เน้น */ + --purple: #7a4cc0; /* ม่วงหลัก — ปุ่ม / CTA / แอคเซนต์ */ + --purple-300: #b07ce0; /* ม่วงอ่อน — ปลาย gradient / ขอบโฟกัส */ + --purple-50: #f3ecff; /* พื้นม่วงอ่อน — badge / ชิป */ + --purple-25: #faf7ff; /* พื้นไล่ม่วงจางสุด — hover / hero */ + + /* พื้นฐาน */ + --paper: #ffffff; /* พื้นขาวหลัก */ + --ink: #1f2a44; /* ตัวอักษรหลัก (น้ำเงินเข้ม) */ + --muted: #6f7b95; /* ตัวอักษรรอง */ + --line: #e7e0f6; /* เส้นขอบม่วงอ่อน */ + + /* หมวดเส้นทาง (route_group ใน routes.json) — ใช้กับ "เลขสาย" (chip) เท่านั้น */ + --group-bangkok: #1f5fbf; /* เข้ากรุงเทพฯ — น้ำเงิน */ + --group-interprovincial: #7a4cc0; /* ระหว่างจังหวัด — ม่วง (ม่วงแบรนด์) */ + --group-in-province: #d6388f; /* ภายในจังหวัด — ชมพู */ + --group-municipal: #6b7268; /* ภายในเทศบาล — เทา (สำรอง ยังไม่มีสายใช้) */ + + /* สถานะ */ + --green-500: #1f8765; /* มีรอบ / เปิดให้บริการ */ + --green-50: #e4efe4; + --amber: #c47b1d; /* เตือน / หมายเหตุ (ไม่ใช่สีหลัก) */ + --amber-50: #fff6e8; + --red: #c93a3a; /* ออกรถแล้ว / ยกเลิก */ + --red-50: #fbe4e4; + + /* โครงสร้าง */ + --radius: 8px; /* มุมโค้งเล็ก เท่านั้น */ + --radius-sm: 4px; + --shadow: none; /* ห้ามใช้ shadow เป็นเครื่องมือแบ่งองค์ประกอบ */ + --line-w: 1px; + + /* gradient ที่อนุญาต (ใช้ซ้ำได้) */ + --grad-brand: linear-gradient(135deg, #7a4cc0, #b07ce0); /* ปุ่ม/ชิป/CTA */ + --grad-bg: linear-gradient(180deg, #ffffff, #faf7ff, #f4f0fd); /* พื้นหลังหน้า */ +} +``` + +### กติกาสีต่อสถานะ +| องค์ประกอบ | สี | +|---|---| +| แอคเซนต์ / ปุ่ม / CTA / รหัสป้าย | `--grad-brand` (ม่วงหลัก) | +| พื้นหลังหน้า | `--grad-bg` (ขาว→ม่วงจาง) | +| ป้ายสถานะ "มีรอบ/เปิดให้บริการ" | `--green-500` | +| ป้ายสถานะ "ออกรถแล้ว/ปิด" | `--red` | +| ข้อมูลว่าง / ไม่มีพิกัด | `--muted` | +| หมายเหตุ / เตือน | `--amber` (ใช้ sparingly) | + +--- + +## 3.1 ระบบภาษา (i18n) + +คำแปลแยกเป็น **ไฟล์ต่อภาษา** — `frontend/locales/<รหัสภาษา>.json` (แบน: `"key": "ข้อความ"`) + +- **ภาษาที่รองรับ** ประกาศที่ `frontend/i18n.js → SUPPORTED` (ปัจจุบัน `th`, `en`) · ภาษาตั้งต้น `th` + ใช้เป็น fallback เมื่อคีย์ขาดในภาษาปัจจุบัน +- **เพิ่มภาษาใหม่** = วางไฟล์ `frontend/locales/<รหัส>.json` + เพิ่มรหัสใน `SUPPORTED` + + เพิ่ม `./locales/<รหัส>.json` ใน PRECACHE ของ `frontend/sw.js` (ไม่ต้องแก้โค้ดอื่น) +- **โหลดแบบ lazy** เฉพาะภาษาที่ใช้ (+ ภาษาตั้งต้น) — ไม่ดึงทุกภาษามาทั้งหน้า +- **ข้อความใน HTML คือ fallback** — ถ้าโหลดไฟล์ภาษาไม่สำเร็จ ระบบจะ **ไม่เขียนทับ** (คงข้อความเดิมไว้) +- **สลับภาษา** → `I18N.setLang()` โหลดไฟล์ภาษาให้เสร็จก่อน แล้วประกาศ event `langchange` ให้หน้าวาดใหม่ + (กันข้อความที่ JS สร้างค้างเป็นภาษาเก่า) · จำค่าไว้ใน `localStorage('at_lang')` +- `` ถูกอัปเดตตามภาษาที่เลือกอัตโนมัติ (a11y · การตัดคำ · เลือกฟอนต์) +- **ชื่อเฉพาะไม่แปล** — ชื่อสถานี จังหวัด สายรถ (ภาษาไทยเสมอ) +- **ตรวจก่อน commit:** `python resource/tools/check-i18n.py` + +## 4. ตัวพิมพ์ (Typography) + +```css +--font-display: "K2D", "Prompt", "Noto Sans Thai", sans-serif; /* หัวเรื่อง — หนัก 600–800 (มีหัวแบบไทย) */ +--font-body: "K2D", "Noto Sans Thai", "Sarabun", sans-serif; /* เนื้อหา — อ่านง่ายบนจอเล็ก */ +--font-mono: "IBM Plex Mono", ui-monospace, monospace; /* เวลา + เลขสาย + ตัวเลข */ +``` + +**ทำไม K2D:** ฟอนต์ไทย **มีหัว (Loop)** หัวเหลี่ยมโมเดิร์น ไม่เชย · น้ำหนักครบ 300–800 · ตัวเลขสวย (เข้าคู่กับ +`IBM Plex Mono` ที่ใช้กับเวลา/เลขสาย) · ใบอนุญาต SIL OFL + +**ฝังไว้ในโปรเจกต์ (ไม่พึ่ง CDN):** ไฟล์อยู่ที่ `frontend/vendor/fonts/` — `k2d.css` (@font-face 18 กฎ · 6 น้ำหนัก × +subset thai/latin/latin-ext · ~218 KB) + ไฟล์ `.woff2` 18 ไฟล์ +· precache ใน `sw.js` → **ทำงานออฟไลน์ได้จริง** · อัปเดตฟอนต์ = โหลดชุดใหม่ทับ แล้ว bump `VERSION` ใน `sw.js` +· `Prompt` / `Noto Sans Thai` ยังโหลดจาก Google Fonts เป็นตัวสำรองใน Fallback chain (ออฟไลน์จะถอยไป `system-ui`) + +| ระดับ | ฟอนต์ | ขนาด | ลักษณะ | +|---|---|---|---| +| H1 (hero) | display 800 | clamp(2.2rem, 6vw, 3.4rem) | ตัวตรง ไม่มี gradient | +| H2 (section) | display 700 | 1.35rem | + เส้นใต้สั้น 24px สี `--purple` | +| เลขสาย/รหัสป้าย/เวลา | mono 700 | 1.1–1.6rem | `font-variant-numeric: tabular-nums` | +| ป้าย micro-label | body 600 | 0.72rem | ภาษาอังกฤษ ตัวพิมพ์ใหญ่ `letter-spacing: 0.14em`, สี muted | + +**กฎ:** ตัวเลข/รหัส/เวลาทุกตำแหน่งต้อง mono + tabular-nums — ตัวเลขต้องเรียงตรงกัน + +--- + +## 5. องค์ประกอบ (Component Spec) + +### การ์ดเส้นทาง / ป้าย (route card / stop tile) +- พื้น `--paper`, ขอบ `1px solid --line`, `radius: 8px` +- หัวการ์ด / รหัสป้าย: ตัวเลข mono ใหญ่บนพื้น `--grad-brand` ตัวอักษรขาว +- ชื่อ: body 700 ขนาด 1rem +- ข้อมูลรอง: muted 0.85rem +- hover: ขอบเปลี่ยนเป็น `--purple-300` + `translateY(-1px)` — **ห้ามใส่ shadow** + +### ชิปรหัส / เวลา (code chip / departure chip) +- รหัสป้าย/เลขสาย: พื้น `--grad-brand` ตัวอักษรขาว mono 700 +- กลุ่มเวลาวางเป็น grid เรียงจากน้อยไปมาก + +### เลขสายหน้า `/routes/:id` — พื้นหลังตามหมวดเส้นทาง +เลขสาย (`.mu-route-chip`) เปลี่ยนสีพื้นหลังตาม **หมวดเส้นทาง** ที่ประกาศใน +`frontend/public/resource/data/routes.json → route_group` (นิยามหมวดอยู่ที่ `route_groups.json`) +เพื่อให้อ่านปราดเดียวรู้ว่าสายนั้นเป็นสายประเภทใด + +| หมวด (`route_group`) | สี | โทเคน | คลาส CSS | +|---|---|---|---| +| `bangkok` — เข้ากรุงเทพฯ | น้ำเงิน | `--group-bangkok` | `.grp-bangkok` | +| `interprovincial` — ระหว่างจังหวัด | ม่วง | `--group-interprovincial` | `.grp-interprovincial` | +| `in_province` — ภายในจังหวัด | ชมพู | `--group-in-province` | `.grp-in_province` | +| `municipal` — ภายในเทศบาล | เทา (สำรอง) | `--group-municipal` | `.grp-municipal` | +| ไม่ระบุ / ไม่รู้จัก | ม่วงแบรนด์ (ค่าเริ่มต้น) | `--grad-brand` | *(ไม่มีคลาส)* | + +- ใช้เฉพาะ **การ์ดหัวเรื่องหน้ารายละเอียดสาย** (`/routes/:id`) — chip เล็กในหน้า `/stops` ยังใช้ม่วงแบรนด์ +- **เพิ่มหมวดใหม่** = เพิ่ม `route_group` ใน `route_groups.json` + โทเคนสีใน §3 + กฎ `.grp-` ใน `busDetail.html` +- สีของหมวด **ไม่ใช่** สีสถานะ — ห้ามนำไปใช้กับ badge สถานะ (§5 ป้ายสถานะ) + +### ป้ายสถานะ (status badge) +- พื้นสีอ่อน (`--green-50` / `--red-50` / `--amber-50`) + ตัวอักษรสีเข้มของเฉดนั้น +- ใช้เฉพาะบอกสถานะจริง ไม่ใช่แค่ตกแต่ง + +### หัวโซน (zone head) — ป้ายหัวข้อ + บรรทัดข้อมูล +ใช้กับทุกโซนที่มีป้ายกำกับ (`.mu-zone-head`) เช่น `/check` (`ตารางเวลาเดินรถทุกจุดจอด`) และ `/routes/:id` (แผนที่) + +- ป้ายหัวข้อ (`.mu-zone-tag`) — แคปซูลสีอ่อนตามโทนของโซน (tag-purple / tag-sky / tag-pink / tag-yellow) +- **บรรทัดข้อมูลต้องแยกเป็น "ชิ้น" (`.mu-zone-seg`)** ไม่ใช่สตริงยาว ๆ ที่ต่อด้วย `·` เอง + - เหตุผล: ภาษาไทยไม่มีเว้นวรรค → ถ้าเป็นสตริงเดียว เบราว์เซอร์จะ **ตัดกลางชื่อสถานี** + - แต่ละชิ้นเป็น flex item → ตัดบรรทัดเป็นหน่วย · ตัวคั่น `·` วาดด้วย `::after` (ท้ายชิ้น ไม่ขึ้นต้นบรรทัด) + - ชิ้นที่เล็กลง (เช่น ชื่อสถานีในวงเล็บ `.mu-zone-at`) ช่วยให้บรรทัดจัดเรียงสวยขึ้น +- **มือถือ (<768px)** — ป้ายหัวข้อบรรทัดบน · บรรทัดข้อมูลเต็มความกว้าง เรียงลงมา (flex + wrap) +- **จอใหญ่ (≥768px)** — เปลี่ยนเป็น **grid 2 คอลัมน์**: ป้ายหัวข้อซ้าย · บรรทัดข้อมูลคอลัมน์ขวา + · จำกัดความยาวบรรทัด `max-width: 82ch` (กันบรรทัดยาวเกินอ่านยาก) +- ห้ามใช้ `flex` โดยไม่ใส่ `flex-wrap` ร่วมกับลูกที่เป็น `flex-basis:100%` (จะถูกบีบรวมแถวเดียว) + +### แถบนำทาง (topbar) +- พื้น `--paper` (ขาว) ตัวอักษร `--ink` ขอบล่าง `1px solid --line` +- active menu = เส้นใต้ `--purple` +- CTA "เช็กเวลาเดินรถ" = พื้น `--grad-brand` ตัวอักษรขาวหนา + +### ฟอร์มค้นหา +- พื้น `--paper` ขอบ `--line`, โฟกัส = ขอบ `--purple-300` — ไม่มี glow +- ช่องกรอกแบบแบ่งกล่อง (รหัสป้าย) ใช้ mono + กล่องละ 1 หลัก + +--- + +## 6. วิธีเขียนงานออกแบบใหม่ (สำหรับ AI) + +เมื่อได้รับงาน "ออกแบบ/ปรับ UI" ให้ทำตามลำดับ: + +1. **ห้ามเริ่มเขียนโค้ดทันที** — เขียน mockup spec 1 ย่อหน้า: concept นี้คืออะไร, ใช้สี/ฟอนต์/ลวดลายอะไร +2. ใช้โทเคนจากหัวข้อ 3–4 เท่านั้น — ถ้าสี/ขนาดไม่พอ ค่อยเพิ่มในไฟล์นี้ (ไม่ใช่ inline ในโค้ด) +3. ใช้ class เดิม + ปรับ CSS ตาม spec — ห้ามสร้าง class ใหม่ทั้งชุดโดยไม่จำเป็น +4. ตรวจกฎ "ห้ามทำ" (หัวข้อ 2) ก่อนสรุปงาน + +## 7. เอกสารอ้างอิงเชิงภาพ (moodboard ภาษา) + +- พื้นหลังไล่เฉดขาว→ม่วงอ่อน (single-hue fade) — สะอาด ไม่มีสีรุ้ง +- ป้าย/CTA ม่วง `#7a4cc0` ตัดกับพื้นขาว — แอคเซนต์เดียว ชัดเจน +- ตัวเลขรหัสป้ายแบบ mono + tabular — เรียงตรงกันเหมือนป้ายจริง +- เส้นแบ่งบาง ๆ ม่วงอ่อน `#e7e0f6` — แบ่งองค์ประกอบ ไม่ใช้เงา + +--- + +*ไฟล์นี้มีผลบังคับใช้กับทุกงานออกแบบในโปรเจกต์ — ถ้าอยากเปลี่ยนทิศทางศิลป์ ต้องแก้ไฟล์นี้ก่อน แล้วค่อยเขียนโค้ด* + +--- + +## 9. รูปภาพ (Asset cache) + +รูปทุกตัวเติม `?v=<เวอร์ชันแอป>` อัตโนมัติผ่าน `frontend/imageurl.js` — เปลี่ยนรูปทับชื่อเดิมแล้ว +ต้องรัน `python resource/tools/bump-version.py` เพื่อให้ทุกเครื่องเห็นของใหม่ (รายละเอียดใน AGENTS.md) diff --git a/README.md b/README.md index 9db21ab..bea48a8 100644 --- a/README.md +++ b/README.md @@ -148,18 +148,44 @@ curl -X POST http://localhost:8000/api/images \ หรือวางไฟล์ลง `storage/seed-assets///...` แล้ว backend จะ ingest อัตโนมัติเมื่อ images ยังว่าง -## Flow Nodes (อ้างอิงตามจริงในโค้ด) +## UI (frontend) — พอร์ตจาก mock -| โหนด | หน้า | การ action สำคัญ | -|------|------|--------------------| -| **N1** | `/` (Home) | คลิกการ์ดหมวด → `/routes?group=` · คลิกการ์ดจังหวัด → `/routes?province=` | -| **N2** | `/routes` (รายการเส้นทาง) | คลิกการ์ดเส้นทาง → `/routes/[routeId]` | -| **N3** | `/routes/[routeId]` | คลิก "ดูแบบขยาย" → `/routes/[routeId]/expanded` · คลิกชื่อจุดจอด → `/stops/[stopId]` | -| **N3b** | `/routes/[routeId]/expanded` | แกลเลอรีภาพ · เบอร์โทร · เมตาดาตา | -| **N4** | `/stops` (รายการจุดจอด + แผนที่) | popup marker → `/stops/[stopId]` · คลิกการ์ด → `/stops/[stopId]` | -| **N4b** | `/stops/[stopId]` | คลิกเส้นทาง → `/routes/[routeId]` | +หน้าเว็บทั้งหมดพอร์ตมาจาก `D:\Git\workspace\web-at-transit-mock` แบบ 1:1 +(มาร์กอัป + CSS + ตรรกะ) แต่เปลี่ยนจาก hash router เป็น route จริงของ Next.js -ทุกหน้ายิง `POST /api/visits` ด้วย `visitor_id` UUID v4 ใน `localStorage` +| Route | หน้า | ไฟล์ | +|------|------|------| +| `/` | หน้าแรก — เลือกจังหวัด → สถานี, การ์ดตามหมวดเส้นทาง | `src/app/page.tsx` | +| `/stops` | ค้นหาป้าย (รหัส 5 หลัก / ชื่อสถานที่) + ป้ายใกล้ฉัน | `src/app/stops/page.tsx` | +| `/stops/[code]` | รายละเอียดป้าย + ตารางเดินรถ + แผนที่ | `src/app/stops/[code]/page.tsx` | +| `/routes`, `/routes/[routeId]` | รายละเอียดสาย + รูปรถ + แผนที่เส้นทาง | `src/app/routes/...` | +| `/check`, `/check/[routeId]` | เช็กเวลาเดินรถทุกจุดจอด | `src/app/check/...` | +| `/blog`, `/blog/[postId]` | บทความ + แผนที่ในบทความ | `src/app/blog/...` | +| `/about`, `/credits` | เกี่ยวกับเรา / เครดิต | `src/app/{about,credits}` | + +- มาร์กอัปอยู่ที่ `frontend/src/components/views/*.tsx` +- ตรรกะ (เดิม `ui/*.js`) อยู่ที่ `frontend/src/lib/ui/*.ts` และถูกเรียกผ่าน `PageRuntime` +- CSS: `frontend/src/styles/` (`_shared`, `map`, `shell`, `responsive`) + `styles/pages/*.css` + **ต้อง import CSS ของหน้าใน view ของหน้านั้น** (รายละเอียดใน `docs/UI-PORT.md`) +- ข้อมูล/รูป: `frontend/public/resource/data/`, `frontend/public/image/`, + `frontend/public/content/`, `frontend/public/locales/` +- ดีไซน์: `DESIGN.md` (รัฐธรรมนูญของ UI) + +## การเชื่อมกับ core_management + +`docker-compose.yml` ใช้ `internal-network` (external) และคุยกับบริการที่รันโดย +`D:\Git\core_management`: + +- Postgres: `compose.internal.db.yaml` → ตั้ง `SQL_DB_URL` ใน `.env` +- ไฟล์/รูป: `compose.storage.yaml` → `STORAGE_URL=http://seaweed-filer:8888` + (frontend อ่านผ่าน `/files/...` ที่ proxy ไป backend) +- ไม่มี container ใหม่สำหรับ db/storage ใน repo นี้ + +อัปโหลดรูปที่มีอยู่เข้า SeaweedFS (ทำครั้งเดียวหลัง backend พร้อม): + +```bash +python script/import_assets_to_storage.py --api http://localhost:8080/api --dir frontend/public/image --map script/asset_entity_map.json +``` ## Image Flow Overview diff --git a/docker-compose.yml b/docker-compose.yml index 5e9c3fa..cb14279 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,9 @@ services: env_file: - .env environment: + # SeaweedFS + Postgres มาจาก stack ของ D:\Git\core_management + # (compose.storage.yaml / compose.internal.db.yaml) ผ่าน internal-network + STORAGE_URL: ${STORAGE_URL:-http://seaweed-filer:8888} STORAGE_BUCKET: transit STORAGE_PUBLIC_BASE: /files BIND_ADDR: 0.0.0.0:${BACKEND_PORT} diff --git a/docs/UI-PORT.md b/docs/UI-PORT.md new file mode 100644 index 0000000..f6c87fa --- /dev/null +++ b/docs/UI-PORT.md @@ -0,0 +1,90 @@ +# UI port — web-at-transit-mock → web-at-transit (Next.js) + +Frontend ของ repo นี้เป็น **พอร์ต 1:1 จาก mock** (`D:\Git\workspace\web-at-transit-mock`) +มาร์กอัป/CSS/ข้อความ/ตรรกะ ต้องตรงกับ mock — mock คือแหล่งความจริงของดีไซน์ +อ่าน `DESIGN.md` ก่อนแก้ UI ทุกครั้ง + +## โครงสร้าง frontend + +``` +frontend/ +├─ src/app/ route จริง (mock เดิมใช้ hash router) +│ ├─ page.tsx / หน้าแรก +│ ├─ stops/page.tsx /stops ป้ายหยุดรถ + ค้นหา +│ ├─ stops/[code]/page.tsx /stops/:code รายละเอียดป้าย +│ ├─ routes/page.tsx /routes รายละเอียดสาย +│ ├─ routes/[routeId]/page.tsx /routes/:id +│ ├─ check/{,[routeId]}/ /check, /check/:id +│ ├─ blog/{,[postId]}/ /blog, /blog/:postId +│ ├─ about/page.tsx /about +│ ├─ credits/page.tsx /credits +│ └─ files/[...path]/route.ts proxy → backend /files (SeaweedFS) +├─ src/components/ +│ ├─ views/*.tsx มาร์กอัปแต่ละหน้า (แปลงจาก partials ของ mock) +│ ├─ SiteHeader.tsx topbar + nav (แทน index.html) +│ ├─ SiteFooter.tsx footer + สายยอดนิยม + ตัวเลขผู้เข้าชม +│ ├─ IconSprite.tsx SVG symbols (#ic-*) +│ ├─ PageRuntime.tsx เรียก mount() ของหน้า หลัง runtime พร้อม +│ └─ SiteBoot.tsx โหลด shared libs + apply i18n ทุกหน้า +├─ src/lib/ +│ ├─ runtime.ts boot shared libs, mountPage(), route context +│ └─ ui/*.ts ตรรกะที่พอร์ตจาก ui/*.js (แก้เฉพาะ path + mount()) +├─ src/styles/ +│ ├─ _shared.css · map.css · shell.css · responsive.css +│ └─ pages/*.css CSS ของ partial แต่ละหน้า +└─ public/ + ├─ image/ ← .image ของ mock + ├─ resource/data/ ← resource/data ของ mock (JSON + geojson + scheduleslist) + ├─ content/{blog,about}-data/ เนื้อหาบทความ + ├─ locales/{th,en}.json คำแปล (I18N) + └─ vendor/{fonts,leaflet} K2D ฝังในโปรเจกต์ + Leaflet +``` + +## กฎที่ต้องถือ (บทเรียนจากการพอร์ต) + +1. **CSS ของแต่ละหน้า import ใน view ของหน้านั้น** (`src/components/views/*.tsx`) + - ห้าม import รวมใน `layout.tsx`: CSS ทุกหน้าจะทับกัน (เช่น `.mu-toolbar` ของ + route.css ทับ stops.css) — เกิดแล้วระหว่างพอร์ต + - ห้ามครอบ `@layer` และห้ามเติม `#view` นำหน้า selector เพื่อจัดลำดับ: + ทั้งสองวิธีเปลี่ยน specificity ทำให้ rule ที่ mock ตั้งใจให้ responsive ชนะ กลับแพ้ + (เช่น `.mu-stop-grid` กลายเป็น 2 คอลัมน์แทน 3) + - ที่ถูกคือ: import ต่อ route → Next แยก CSS chunk ต่อหน้า และโหลด base chunk ก่อน + = ลำดับเดียวกับ mock ที่ inject ` + + +
+

แก้ไข schedules.json เครื่องมือภายใน · ไม่ได้เป็นส่วนของเว็บ

+
+ กำลังโหลด… +
+ + + + + + + +
+ +
+ + +
+
+ +
+

ผลตรวจทั้งไฟล์

+

ตัวเลข/รูปแบบเวลา · จุดจอดที่ไม่ตรงกับลำดับสาย · จำนวนเที่ยวไม่เท่ากันข้ามจุดในทิศเดียวกัน

+
+
+ +
+
วางไฟล์ schedules.json ที่นี่เพื่อเปิด
+ + + + + diff --git a/frontend/public/resource/data/schedules.json b/frontend/public/resource/data/schedules.json new file mode 100644 index 0000000..e7dae15 --- /dev/null +++ b/frontend/public/resource/data/schedules.json @@ -0,0 +1,106 @@ +{ + "schema": 2, + "index": true, + "note": "สารบัญชี้ไป scheduleslist/schedules.json (1 ไฟล์ = 1 เส้นทาง) — แก้ไฟล์ย่อยนั้นโดยตรง หรือใช้ resource/data/schedules-editor.html", + "dir": "scheduleslist/", + "routes": [ + { + "route_id": "101", + "file": "schedules101.json", + "n_directions": 4, + "n_stops": 8, + "n_trips": 64 + }, + { + "route_id": "15", + "file": "schedules15.json", + "n_directions": 3, + "n_stops": 4, + "n_trips": 22 + }, + { + "route_id": "902", + "file": "schedules902.json", + "n_directions": 2, + "n_stops": 2, + "n_trips": 53 + }, + { + "route_id": "951", + "file": "schedules951.json", + "n_directions": 2, + "n_stops": 6, + "n_trips": 47 + }, + { + "route_id": "952", + "file": "schedules952.json", + "n_directions": 2, + "n_stops": 2, + "n_trips": 6 + }, + { + "route_id": "954", + "file": "schedules954.json", + "n_directions": 1, + "n_stops": 1, + "n_trips": 4 + }, + { + "route_id": "8", + "file": "schedules8.json", + "n_directions": 2, + "n_stops": 2, + "n_trips": 4 + }, + { + "route_id": "464", + "file": "schedules464.json", + "n_directions": 3, + "n_stops": 4, + "n_trips": 88 + }, + { + "route_id": "641", + "file": "schedules641.json", + "n_directions": 2, + "n_stops": 2, + "n_trips": 18 + }, + { + "route_id": "2194", + "file": "schedules2194.json", + "n_directions": 2, + "n_stops": 2, + "n_trips": 6 + }, + { + "route_id": "324", + "file": "schedules324.json", + "n_directions": 2, + "n_stops": 2, + "n_trips": 2 + }, + { + "route_id": "1011", + "file": "schedules1011.json", + "n_directions": 2, + "n_stops": 2, + "n_trips": 6 + }, + { + "route_id": "2231", + "file": "schedules2231.json", + "n_directions": 2, + "n_stops": 2, + "n_trips": 2 + }, + { + "route_id": "999", + "file": "schedules999.json", + "n_directions": 1, + "n_stops": 1, + "n_trips": 0 + } + ] +} diff --git a/frontend/public/resource/data/scheduleslist/schedules101.json b/frontend/public/resource/data/scheduleslist/schedules101.json new file mode 100644 index 0000000..5b6bb4d --- /dev/null +++ b/frontend/public/resource/data/scheduleslist/schedules101.json @@ -0,0 +1,126 @@ +{ + "schema": 3, + "route_id": "101", + + "updated": "2026-10-04", + "route_name": "อ่างทอง-ป่าโมก-อยุธยา", + "station_order": [ + 1, + 2, + 3 + ], + "weekday": { + "label": "เวลาวันทำงาน", + "directions": { + "ออกจากอ่างทอง": { + "from_station_id": 1, + "departures": [ + "07:30", + "08:20", + "09:10", + "10:00", + "10:50", + "11:50", + "13:00", + "14:00", + "15:00" + ] + }, + "ออกจากอยุธยา": { + "from_station_id": 3, + "departures": [ + "07:30", + "08:20", + "09:10", + "10:00", + "10:50", + "11:40", + "12:30", + "13:20", + "14:10", + "15:00", + "15:50", + "16:40", + "17:30", + "18:30" + ] + }, + "ป่าโมกไปอ่างทอง": { + "from_station_id": 2, + "departures": [ + "08:00", + "08:50", + "09:40", + "10:30", + "11:20", + "12:20", + "13:30", + "14:30", + "15:30" + ] + }, + "ป่าโมกไปอยุธยา": { + "from_station_id": 2, + "departures": [ + "06:30", + "07:20", + "08:10", + "09:00", + "09:50", + "10:40", + "11:30", + "12:20", + "13:10", + "14:00", + "14:50", + "15:40", + "16:30", + "17:30" + ] + } + } + }, + "holiday": { + "label": "เวลาวันหยุด", + "directions": { + "ออกจากอ่างทอง": { + "from_station_id": 1, + "departures": [ + "09:30", + "10:30", + "12:00", + "14:30" + ] + }, + "ออกจากอยุธยา": { + "from_station_id": 3, + "departures": [ + "06:50", + "08:30", + "10:00", + "11:40", + "13:20", + "15:00", + "17:00" + ] + }, + "ป่าโมกไปอ่างทอง": { + "from_station_id": 2, + "departures": [ + "06:20", + "08:30" + ] + }, + "ป่าโมกไปอยุธยา": { + "from_station_id": 2, + "departures": [ + "07:40", + "09:20", + "10:50", + "12:30", + "13:20" + ] + } + } + } +} diff --git a/frontend/public/resource/data/scheduleslist/schedules1011.json b/frontend/public/resource/data/scheduleslist/schedules1011.json new file mode 100644 index 0000000..37a49fc --- /dev/null +++ b/frontend/public/resource/data/scheduleslist/schedules1011.json @@ -0,0 +1,44 @@ +{ + "schema": 2, + "route_id": "1011", + "updated": "2026-10-04", + "generated_from": "schedules.json", + "station_order": [ + 8, + 1 + ], + "directions": [ + { + "direction_id": "from-1", + "direction_label": "จากบขส.อ่างทอง", + "stops": [ + { + "station_id": 1, + "times": [ + "12:00", + "16:00", + "17:00" + ], + "direction_note": "บขส.อ่างทอง → โพธิ์ทอง → แสวงหา → วัดสีบัวทอง" + } + ], + "direction_note": "บขส.อ่างทอง → โพธิ์ทอง → แสวงหา → วัดสีบัวทอง" + }, + { + "direction_id": "dir-1", + "direction_label": "จากวัดสีบัวทอง", + "stops": [ + { + "station_id": 8, + "times": [ + "06:00", + "06:30", + "14:30" + ], + "direction_note": "วัดสีบัวทอง → แสวงหา → โพธิ์ทอง → บขส.อ่างทอง" + } + ], + "direction_note": "วัดสีบัวทอง → แสวงหา → โพธิ์ทอง → บขส.อ่างทอง" + } + ] +} diff --git a/frontend/public/resource/data/scheduleslist/schedules15.json b/frontend/public/resource/data/scheduleslist/schedules15.json new file mode 100644 index 0000000..35297eb --- /dev/null +++ b/frontend/public/resource/data/scheduleslist/schedules15.json @@ -0,0 +1,81 @@ +{ + "schema": 2, + "route_id": "15", + + "updated": "2026-10-04", + "generated_from": "schedules.json", + "station_order": [ + 1, + 2, + 4, + 5, + 6 + ], + "directions": [ + { + "direction_id": "from-1", + "direction_label": null, + "stops": [ + { + "station_id": 1, + "times": [ + "05:00", + "05:45", + "06:30", + "07:30" + ] + } + ] + }, + { + "direction_id": "all", + "direction_label": null, + "stops": [ + { + "station_id": 2, + "times": [ + "05:30", + "06:20", + "07:05", + "07:55", + "08:40", + "09:30", + "11:20", + "12:10", + "13:00", + "15:00" + ] + }, + { + "station_id": 6, + "times": [ + "06:00", + "08:30", + "09:15", + "10:00", + "12:30", + "14:00", + "15:00", + "16:00" + ] + } + ] + }, + { + "direction_id": "new-3", + "direction_label": null, + "stops": [ + { + "station_id": 5, + "derive": { + "from_station_id": 6, + "offset_min": 30, + "note": "ท่ารถมินิบัสต่างจังหวัด" + }, + "times": [] + } + ], + "autoTimes": true + } + ] +} diff --git a/frontend/public/resource/data/scheduleslist/schedules2194.json b/frontend/public/resource/data/scheduleslist/schedules2194.json new file mode 100644 index 0000000..0aeaacd --- /dev/null +++ b/frontend/public/resource/data/scheduleslist/schedules2194.json @@ -0,0 +1,43 @@ +{ + "schema": 2, + "route_id": "2194", + + "updated": "2026-10-04", + "generated_from": "schedules.json", + "station_order": [ + 8, + 4 + ], + "directions": [ + { + "direction_id": "dir-1", + "direction_label": "ออกจากวัดหัวเวียง", + "stops": [ + { + "station_id": 8, + "times": [ + "05:00", + "06:00", + "07:00" + ], + "direction_note": "ออกจากวัดหัวเวียง" + } + ] + }, + { + "direction_id": "from-4", + "direction_label": "ออกจากตลาดเจ้าพรหม", + "stops": [ + { + "station_id": 4, + "times": [ + "16:00", + "17:00", + "18:00" + ], + "direction_note": "ออกจากตลาดเจ้าพรหม" + } + ] + } + ] +} diff --git a/frontend/public/resource/data/scheduleslist/schedules2231.json b/frontend/public/resource/data/scheduleslist/schedules2231.json new file mode 100644 index 0000000..77d04af --- /dev/null +++ b/frontend/public/resource/data/scheduleslist/schedules2231.json @@ -0,0 +1,38 @@ +{ + "schema": 2, + "route_id": "2231", + + "updated": "2026-10-04", + "generated_from": "schedules.json", + "station_order": [ + 8, + 1 + ], + "directions": [ + { + "direction_id": "from-1", + "direction_label": null, + "stops": [ + { + "station_id": 1, + "times": [ + "16:00" + ] + } + ] + }, + { + "direction_id": "dir-1", + "direction_label": "จากวัดมหานาม", + "stops": [ + { + "station_id": 8, + "times": [ + "08:00" + ], + "direction_note": "จากวัดมหานาม" + } + ] + } + ] +} diff --git a/frontend/public/resource/data/scheduleslist/schedules324.json b/frontend/public/resource/data/scheduleslist/schedules324.json new file mode 100644 index 0000000..4c0e6a9 --- /dev/null +++ b/frontend/public/resource/data/scheduleslist/schedules324.json @@ -0,0 +1,38 @@ +{ + "schema": 2, + "route_id": "324", + + "updated": "2026-10-04", + "generated_from": "schedules.json", + "station_order": [ + 8, + 1 + ], + "directions": [ + { + "direction_id": "from-1", + "direction_label": null, + "stops": [ + { + "station_id": 1, + "times": [ + "10:00" + ] + } + ] + }, + { + "direction_id": "dir-1", + "direction_label": "จากวัดไชโยวรวิหาร", + "stops": [ + { + "station_id": 8, + "times": [ + "08:00" + ], + "direction_note": "จากวัดไชโยวรวิหาร" + } + ] + } + ] +} diff --git a/frontend/public/resource/data/scheduleslist/schedules464.json b/frontend/public/resource/data/scheduleslist/schedules464.json new file mode 100644 index 0000000..b3080b0 --- /dev/null +++ b/frontend/public/resource/data/scheduleslist/schedules464.json @@ -0,0 +1,107 @@ +{ + "schema": 2, + "route_id": "464", + + "updated": "2026-10-04", + "generated_from": "schedules.json", + "station_order": [ + 9, + 1, + 10 + ], + "directions": [ + { + "direction_id": "all", + "direction_label": "จากบขส.สุพรรณบุรี / บขส.สระบุรี", + "stops": [ + { + "station_id": 9, + "times": [ + "04:40", + "05:10", + "05:40", + "06:10", + "06:40", + "07:10", + "07:40", + "08:15", + "08:50", + "09:25", + "10:00", + "10:35", + "11:10", + "11:45", + "12:20", + "12:55", + "13:30", + "14:05", + "14:40", + "15:15", + "15:50", + "16:25", + "17:00", + "17:40" + ] + }, + { + "station_id": 10, + "times": [ + "05:00", + "05:40", + "06:20", + "07:10", + "08:00", + "08:40", + "09:20", + "10:00", + "10:40", + "11:20", + "12:00", + "12:40", + "13:20", + "14:00", + "14:40", + "15:20", + "16:00", + "16:40", + "17:20", + "18:00" + ] + } + ] + }, + { + "direction_id": "dir-1", + "direction_label": "ออกจากอ่างทอง", + "stops": [ + { + "station_id": 1, + "times": [], + "direction_note": "ไปสุพรรณบุรี", + "derive": { + "from_station_id": 10, + "offset_min": 90, + "note": "ถึงอ่างทองหลังรถออกจาก บขส.สระบุรี 90 นาที" + } + } + ] + }, + { + "direction_id": "dir-2", + "direction_label": "ออกจากอ่างทอง", + "stops": [ + { + "station_id": 1, + "times": [], + "direction_note": "ไปสระบุรี", + "note": null, + "derive": { + "from_station_id": 9, + "offset_min": 60, + "note": "ถึงอ่างทองหลังรถออกจาก บขส.สุพรรณบุรี 60 นาที" + } + } + ] + } + ] +} diff --git a/frontend/public/resource/data/scheduleslist/schedules641.json b/frontend/public/resource/data/scheduleslist/schedules641.json new file mode 100644 index 0000000..f7205ca --- /dev/null +++ b/frontend/public/resource/data/scheduleslist/schedules641.json @@ -0,0 +1,88 @@ +{ + "schema": 2, + "route_id": "641", + + "updated": "2026-10-04", + "generated_from": "schedules.json", + "station_order": [ + 1, + 8, + 7 + ], + "directions": [ + { + "direction_id": "from-1", + "direction_label": null, + "stops": [ + { + "station_id": 1, + "times": [ + "07:00", + "08:00", + "09:00", + "10:00", + "11:00", + "12:00", + "13:30", + "14:30", + "16:30" + ], + "note": "10:00 และ 13:30 ไม่ได้มีทุกวัน" + } + ] + }, + { + "direction_id": "all", + "direction_label": null, + "stops": [ + { + "station_id": 7, + "times": [ + "07:00", + "08:00", + "09:00", + "10:00", + "11:00", + "12:00", + "13:30", + "14:30", + "16:30" + ], + "note": "10:00 และ 13:30 ไม่ได้มีทุกวัน" + } + ] + }, + { + "direction_id": "new-3", + "direction_label": "7-11บ้านแพรกไปลพบุรี", + "stops": [ + { + "station_id": 8, + "derive": { + "from_station_id": 1, + "offset_min": 25, + "note": null + }, + "times": [] + } + ], + "autoTimes": true + }, + { + "direction_id": "new-3", + "direction_label": "7-11บ้านแพรกไปอ่างทอง", + "stops": [ + { + "station_id": 8, + "derive": { + "from_station_id": 7, + "offset_min": 25, + "note": "อ่างทอง" + }, + "times": [] + } + ], + "autoTimes": true + } + ] +} diff --git a/frontend/public/resource/data/scheduleslist/schedules8.json b/frontend/public/resource/data/scheduleslist/schedules8.json new file mode 100644 index 0000000..a47f9d3 --- /dev/null +++ b/frontend/public/resource/data/scheduleslist/schedules8.json @@ -0,0 +1,90 @@ +{ + "schema": 2, + "route_id": "8", + + "updated": "2026-10-04", + "generated_from": "schedules.json", + "station_order": [ + 13, + 8, + 6, + 5 + + ], + "directions": [ + { + "direction_id": "all", + "direction_label": null, + "stops": [ + { + "station_id": 13, + "times": [ + "07:30", + "10:00" + ] + } + ], + "speedKmh": 60 + }, + { + "direction_id": "dir-1", + "direction_label": null, + "stops": [ + { + "station_id": 6, + "times": [ + "10:00", + "13:00" + ], + "direction_note": null, + "note": null + } + ] + }, + { + "direction_id": "rungsit", + "direction_label": "ตลาดแสวงหา", + "stops": [ + { + "station_id": 8, + "derive": { + "from_station_id": 13, + "offset_min": 90, + "note": null + }, + "times": [] + } + ] + }, + { + "direction_id": "rungsit", + "direction_label": "ตลาดสดเทศบาลตำบลโพธิ์ทอง", + "stops": [ + { + "station_id": 8, + "derive": { + "from_station_id": 13, + "offset_min": 110, + "note": null + }, + "times": [] + } + ] + }, + { + "direction_id": "rungsit", + "direction_label": null, + "stops": [ + { + "station_id": 5, + "derive": { + "from_station_id": 6, + "offset_min": 30, + "note": null + }, + "times": [] + } + ] + } + ] +} diff --git a/frontend/public/resource/data/scheduleslist/schedules902.json b/frontend/public/resource/data/scheduleslist/schedules902.json new file mode 100644 index 0000000..2da07c7 --- /dev/null +++ b/frontend/public/resource/data/scheduleslist/schedules902.json @@ -0,0 +1,104 @@ +{ + "schema": 2, + "route_id": "902", + + "updated": "2026-10-04", + "generated_from": "schedules.json", + "station_order": [ + 1, + 15, + 6 + ], + "directions": [ + { + "direction_id": "from-1", + "direction_label": null, + "stops": [ + { + "station_id": 1, + "times": [ + "04:00", + "04:30", + "05:00", + "05:30", + "06:00", + "06:30", + "07:00", + "07:30", + "08:00", + "08:30", + "09:00", + "09:30", + "10:00", + "10:30", + "11:00", + "11:30", + "12:00", + "12:30", + "13:00", + "13:30", + "14:00", + "14:30", + "15:00", + "15:30", + "16:00", + "16:30", + "17:00", + "17:30" + ] + } + ] + }, + { + "direction_id": "rungsit", + "direction_label": null, + "stops": [ + { + "station_id": 15, + "derive": { + "from_station_id": 6, + "offset_min": 30, + "note": "รอรถที่ 7-11 หน้ากินซ่า (รถจากจตุจักรผ่านมาถึง)" + }, + "times": [] + } + ] + }, + { + "direction_id": "all", + "direction_label": null, + "stops": [ + { + "station_id": 6, + "times": [ + "06:00", + "06:30", + "07:00", + "07:30", + "08:00", + "08:30", + "09:00", + "09:30", + "10:00", + "10:30", + "11:00", + "11:30", + "12:00", + "12:30", + "13:00", + "13:30", + "14:00", + "14:30", + "15:00", + "15:30", + "16:00", + "16:30", + "17:00", + "17:30", + "18:00" + ] + } + ] + } + ] +} diff --git a/frontend/public/resource/data/scheduleslist/schedules951.json b/frontend/public/resource/data/scheduleslist/schedules951.json new file mode 100644 index 0000000..3f74ac9 --- /dev/null +++ b/frontend/public/resource/data/scheduleslist/schedules951.json @@ -0,0 +1,149 @@ +{ + "schema": 2, + "route_id": "951", + + "updated": "2026-10-04", + "generated_from": "schedules.json", + "station_order": [ + 9, + 5, + 6, + 8 + ], + "directions": [ + { + "direction_id": "from-9", + "direction_label": null, + "stops": [ + { + "station_id": 9, + "times": [ + "04:00", + "04:20", + "04:40", + "05:00", + "05:20", + "05:40", + "06:00", + "06:20", + "06:40", + "07:00", + "07:20", + "07:40", + "08:00", + "08:20", + "08:40", + "09:00", + "09:20", + "09:40", + "10:00", + "10:20", + "10:40", + "11:00", + "11:20", + "11:40", + "12:00", + "12:20", + "12:40", + "13:00", + "13:20", + "13:40", + "14:00", + "14:20", + "14:40", + "15:00", + "15:20", + "15:40", + "16:00", + "16:20", + "16:40", + "17:00", + "17:20", + "17:40", + "18:00" + ] + }, + { + "station_id": 8, + "times": [], + "direction_note": "ตลาดวิเศษชัยชาญ", + "note": "ตลาดวิเศษชัยชาญ" + }, + { + "station_id": 8, + "times": [], + "direction_note": "ตลาดอ่างทอง", + "note": "ตลาดอ่างทอง" + } + ] + }, + { + "direction_id": "new-2", + "direction_label": null, + "stops": [ + { + "station_id": 6, + "times": [ + "04:20", + "04:40", + "05:00", + "05:20", + "05:40", + "06:00", + "06:20", + "06:40", + "07:00", + "07:20", + "07:40", + "08:00", + "08:20", + "08:40", + "09:00", + "09:20", + "09:40", + "10:00", + "10:20", + "10:40", + "11:00", + "11:20", + "11:40", + "12:00", + "12:20", + "12:40", + "13:00", + "13:20", + "13:40", + "14:00", + "14:20", + "14:40", + "15:00", + "15:20", + "15:40", + "16:00", + "16:20", + "16:40", + "17:00", + "17:20", + "17:40", + "18:00", + "18:20", + "18:40" + ] + }, + { + "station_id": 5, + "derive": { + "from_station_id": 6, + "offset_min": 30, + "note": "ท่ารถตู้ต่างจังหวัด รังสิต (รถจากจตุจักรผ่านมาถึง)" + }, + "times": [] + }, + { + "station_id": 9, + "times": [] + } + ] + } + ] +} diff --git a/frontend/public/resource/data/scheduleslist/schedules952.json b/frontend/public/resource/data/scheduleslist/schedules952.json new file mode 100644 index 0000000..03c25df --- /dev/null +++ b/frontend/public/resource/data/scheduleslist/schedules952.json @@ -0,0 +1,44 @@ +{ + "schema": 2, + "route_id": "952", + + "updated": "2026-10-04", + "generated_from": "schedules.json", + "station_order": [ + 11, + 12 + ], + "directions": [ + { + "direction_id": "dir-1", + "direction_label": "จากตลาดวิเศษ", + "stops": [ + { + "station_id": 11, + "times": [ + "04:30", + "10:00", + "15:00" + ], + "direction_note": "จากตลาดวิเศษ", + "note": "10:00 มีเฉพาะวันหยุด" + } + ] + }, + { + "direction_id": "all", + "direction_label": null, + "stops": [ + { + "station_id": 12, + "times": [ + "07:00", + "10:30", + "15:00" + ], + "note": " 7:00 มีเฉพาะวันหยุด" + } + ] + } + ] +} diff --git a/frontend/public/resource/data/scheduleslist/schedules954.json b/frontend/public/resource/data/scheduleslist/schedules954.json new file mode 100644 index 0000000..bd4666e --- /dev/null +++ b/frontend/public/resource/data/scheduleslist/schedules954.json @@ -0,0 +1,62 @@ +{ + "schema": 2, + "route_id": "954", + + "updated": "2026-10-04", + "generated_from": "schedules.json", + "station_order": [ + 8, + 5, + 6 + ], + "directions": [ + { + "direction_id": "to-bkk", + "direction_label": "ไปกรุงเทพ (จตุจักร)", + "stops": [ + { + "station_id": 8, + "times": [ + "03:30", + "05:10", + "10:20", + "12:40" + ], + "direction_note": "ตลาดท่าช้าง" + }, + { + "station_id": 6, + "times": [] + } + ] + }, + { + "direction_id": "to-thachang", + "direction_label": "ไปท่าช้าง", + "stops": [ + { + "station_id": 6, + "times": [ + "07:00", + "09:00", + "14:00", + "16:00" + ] + }, + { + "station_id": 5, + "times": [], + "derive": { + "from_station_id": 6, + "offset_min": 30, + "note": "ผ่านรังสิตหลังรถออกจากจตุจักร 30 นาที" + } + }, + { + "station_id": 8, + "times": [] + } + ] + } + ] +} diff --git a/frontend/public/resource/data/scheduleslist/schedules999.json b/frontend/public/resource/data/scheduleslist/schedules999.json new file mode 100644 index 0000000..651ffe3 --- /dev/null +++ b/frontend/public/resource/data/scheduleslist/schedules999.json @@ -0,0 +1,23 @@ +{ + "schema": 2, + "route_id": "999", + + "updated": "2026-10-04", + "generated_from": "schedules.json", + "station_order": [ + 14 + ], + "directions": [ + { + "direction_id": "from-14", + "direction_label": null, + "stops": [ + { + "station_id": 14, + "times": [], + "note": "ยังไม่มีข้อมูลตารางเวลา" + } + ] + } + ] +} diff --git a/frontend/public/resource/data/stations.json b/frontend/public/resource/data/stations.json new file mode 100644 index 0000000..45bb0fc --- /dev/null +++ b/frontend/public/resource/data/stations.json @@ -0,0 +1,152 @@ +{ + "stations": [ + { + "station_id": 1, + "station_code": "at_main_terminal", + "station_name_th": "บขส.อ่างทอง", + "city_th": "เมืองอ่างทอง", + "province_th": "อ่างทอง", + "station_type": "main_terminal", + "latitude": 14.594892813219857, + "longitude": 100.45160878714961 + }, + { + "station_id": 2, + "station_code": "pa_mok_terminal", + "station_name_th": "สถานีขนส่งป่าโมก", + "city_th": "ป่าโมก", + "province_th": "อ่างทอง", + "station_type": "local_terminal", + "latitude": 14.494620342173755, + "longitude": 100.44663039105356 + }, + { + "station_id": 3, + "station_code": "route_101_stop_ayutthaya", + "station_name_th": "ท่ารถสองแถว อยุธยา-ป่าโมก-อ่างทอง", + "city_th": "พระนครศรีอยุธยา", + "province_th": "อยุธยา", + "station_type": "local_stop", + "latitude": 14.359304063054642, + "longitude": 100.57729051741023 + }, + { + "station_id": 4, + "station_code": "jaoprom_market", + "station_name_th": "ตลาดเจ้าพรหม", + "city_th": "พระนครศรีอยุธยา", + "province_th": "อยุธยา", + "station_type": "market", + "latitude": 14.358600551289177, + "longitude": 100.57740172977549 + }, + { + "station_id": 5, + "station_code": "rangsit_van_terminal", + "station_name_th": "ท่ารถตู้ต่างจังหวัด รังสิต", + "city_th": "รังสิต", + "province_th": "ปทุมธานี", + "station_type": "main_terminal", + "latitude": 13.989149716177037, + "longitude": 100.61472107391762 + }, + { + "station_id": 6, + "station_code": "chatuchak_minibus_terminal", + "station_name_th": "สถานีเดินรถโดยสารขนาดเล็ก (จตุจักร) รถตู้/มินิบัส", + "city_th": "จตุจักร", + "province_th": "กรุงเทพมหานคร", + "station_type": "main_terminal", + "latitude": 13.811802065338766, + "longitude": 100.5498111488118 + }, + { + "station_id": 7, + "station_code": "lopburi_main_terminal", + "station_name_th": "บขส.ลพบุรี", + "city_th": "เมืองลพบุรี", + "province_th": "ลพบุรี", + "station_type": "main_terminal", + "latitude": 14.798689894136096, + "longitude": 100.63316793418102 + }, + { + "station_id": 8, + "station_code": "other_stop", + "station_name_th": "จุดขึ้นรถประจำทางอื่นๆ", + "city_th": null, + "province_th": null, + "station_type": "local_stop" + }, + { + "station_id": 9, + "station_code": "suphan_main_terminal", + "station_name_th": "บขส.สุพรรณบุรี", + "city_th": "เมืองสุพรรณบุรี", + "province_th": "สุพรรณบุรี", + "station_type": "main_terminal", + "latitude": 14.473737243267138, + "longitude": 100.12544591300441 + }, + { + "station_id": 10, + "station_code": "saraburi_main_terminal", + "station_name_th": "บขส.สระบุรี", + "city_th": "เมืองสระบุรี", + "province_th": "สระบุรี", + "station_type": "main_terminal", + "latitude": 14.523709233795955, + "longitude": 100.91901540002084 + }, + { + "station_id": 11, + "station_code": "namo_supermarket", + "station_name_th": "นะโมซุปเปอร์มาร์ท", + "city_th": "วิเศษชัยชาญ", + "province_th": "อ่างทอง", + "station_type": "private_stop", + "latitude": 14.59666118926178, + "longitude": 100.35213848667698 + }, + { + "station_id": 12, + "station_code": "pinklao_van_stop", + "station_name_th": "สายใต้เก่า ปิ่นเกล้า จุดจอดรถตู้", + "city_th": "บางกอกน้อย", + "province_th": "กรุงเทพมหานคร", + "station_type": "main_terminal", + "latitude": 13.786761431062317, + "longitude": 100.46776017448384 + }, + { + "station_id": 13, + "station_code": "chainat_main_terminal", + "station_name_th": "บขส.ชัยนาท", + "city_th": "เมืองชัยนาท", + "province_th": "ชัยนาท", + "station_type": "main_terminal", + "latitude": 15.197359140046297, + "longitude": 100.1245558104688 + }, + { + "station_id": 14, + "station_code": "at_999_terminal", + "station_name_th": "บขส.999 อ่างทอง สายเอเชีย-เหนือ (ไม่เข้าเมือง)", + "city_th": "เมืองอ่างทอง", + "province_th": "อ่างทอง", + "station_type": "main_terminal", + "latitude": 14.580083239362345, + "longitude": 100.4841456500421 + }, + { + "station_id": 15, + "station_code": "7-11 kinsa", + "station_name_th": "7-11 สาขากินซ่า", + "city_th": "รังสิต", + "province_th": "ปทุมธานี", + "station_type": "main_terminal", + "latitude": 13.9906952188289, + "longitude": 100.61469598208095 + } + ] +} \ No newline at end of file diff --git a/frontend/public/resource/data/stop-km.json b/frontend/public/resource/data/stop-km.json new file mode 100644 index 0000000..666287c --- /dev/null +++ b/frontend/public/resource/data/stop-km.json @@ -0,0 +1,57 @@ +{ + "8": { + "13": 197.42, + "6": 0.01 + }, + "15": { + "1": 0.02, + "2": 14.32, + "6": 109.52 + }, + "101": { + "3": 39.76, + "1": 0.02, + "2": 14.39 + }, + "324": { + "1": 29.52, + "8": 9.76 + }, + "464": { + "9": 0.0, + "10": 103.15, + "1": 44.95 + }, + "641": { + "1": 0.0, + "7": 43.53 + }, + "902": { + "1": 0.0, + "6": 100.28, + "15": 77 + + }, + "951": { + "9": 0.0, + "20": 42.25 + }, + "952": { + "12": 129.46 + }, + "954": { + "8": 0.0 + }, + "1011": { + "1": 36.02, + "8": 0.36 + }, + "2194": { + "8": 1.11, + "4": 40.84 + }, + "2231": { + "1": 0.0, + "8": 20.13 + } +} diff --git a/frontend/public/ui-manifest.json b/frontend/public/ui-manifest.json new file mode 100644 index 0000000..75179b9 --- /dev/null +++ b/frontend/public/ui-manifest.json @@ -0,0 +1,57 @@ +{ + "name": "Atroute — สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง", + "short_name": "Atroute", + "description": "ค้นหาเส้นทาง ตารางเดินรถ และจุดจอดในจังหวัดอ่างทองและจังหวัดใกล้เคียง", + "lang": "th", + "dir": "ltr", + "start_url": "/", + "scope": "/", + "display": "standalone", + "orientation": "any", + "background_color": "#fcfbff", + "theme_color": "#7a4cc0", + "categories": ["travel", "navigation", "transportation"], + "shortcuts": [ + { + "name": "เช็กเวลาเดินรถ", + "short_name": "เช็กเวลา", + "description": "ดูตารางเวลาเดินรถทุกจุดจอด", + "url": "/check", + "icons": [{ "src": "/image/icons/minibus-192x192.png", "sizes": "192x192", "type": "image/png" }] + }, + { + "name": "ป้ายหยุดรถ", + "short_name": "ป้ายหยุดรถ", + "description": "ค้นหาป้ายหยุดรถทั้งหมด", + "url": "/stops", + "icons": [{ "src": "/image/icons/minibus-192x192.png", "sizes": "192x192", "type": "image/png" }] + }, + { + "name": "รายละเอียดสายรถ", + "short_name": "สายรถ", + "description": "ดูรายละเอียดเส้นทางเดินรถ", + "url": "/routes", + "icons": [{ "src": "/image/icons/minibus-192x192.png", "sizes": "192x192", "type": "image/png" }] + } + ], + "icons": [ + { + "src": "/image/icons/minibus-192x192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "any" + }, + { + "src": "/image/icons/minibus-512x512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "any" + }, + { + "src": "/image/icons/minibus-maskable-512x512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +} diff --git a/frontend/public/vendor/fonts/k2d-300-latin-ext.woff2 b/frontend/public/vendor/fonts/k2d-300-latin-ext.woff2 new file mode 100644 index 0000000..ff7a301 Binary files /dev/null and b/frontend/public/vendor/fonts/k2d-300-latin-ext.woff2 differ diff --git a/frontend/public/vendor/fonts/k2d-300-latin.woff2 b/frontend/public/vendor/fonts/k2d-300-latin.woff2 new file mode 100644 index 0000000..839a0c3 Binary files /dev/null and b/frontend/public/vendor/fonts/k2d-300-latin.woff2 differ diff --git a/frontend/public/vendor/fonts/k2d-300-thai.woff2 b/frontend/public/vendor/fonts/k2d-300-thai.woff2 new file mode 100644 index 0000000..3e6509c Binary files /dev/null and b/frontend/public/vendor/fonts/k2d-300-thai.woff2 differ diff --git a/frontend/public/vendor/fonts/k2d-400-latin-ext.woff2 b/frontend/public/vendor/fonts/k2d-400-latin-ext.woff2 new file mode 100644 index 0000000..50c1784 Binary files /dev/null and b/frontend/public/vendor/fonts/k2d-400-latin-ext.woff2 differ diff --git a/frontend/public/vendor/fonts/k2d-400-latin.woff2 b/frontend/public/vendor/fonts/k2d-400-latin.woff2 new file mode 100644 index 0000000..68f4e9e Binary files /dev/null and b/frontend/public/vendor/fonts/k2d-400-latin.woff2 differ diff --git a/frontend/public/vendor/fonts/k2d-400-thai.woff2 b/frontend/public/vendor/fonts/k2d-400-thai.woff2 new file mode 100644 index 0000000..61fe798 Binary files /dev/null and b/frontend/public/vendor/fonts/k2d-400-thai.woff2 differ diff --git a/frontend/public/vendor/fonts/k2d-500-latin-ext.woff2 b/frontend/public/vendor/fonts/k2d-500-latin-ext.woff2 new file mode 100644 index 0000000..dbfca96 Binary files /dev/null and b/frontend/public/vendor/fonts/k2d-500-latin-ext.woff2 differ diff --git a/frontend/public/vendor/fonts/k2d-500-latin.woff2 b/frontend/public/vendor/fonts/k2d-500-latin.woff2 new file mode 100644 index 0000000..5b26f6a Binary files /dev/null and b/frontend/public/vendor/fonts/k2d-500-latin.woff2 differ diff --git a/frontend/public/vendor/fonts/k2d-500-thai.woff2 b/frontend/public/vendor/fonts/k2d-500-thai.woff2 new file mode 100644 index 0000000..363ffb5 Binary files /dev/null and b/frontend/public/vendor/fonts/k2d-500-thai.woff2 differ diff --git a/frontend/public/vendor/fonts/k2d-600-latin-ext.woff2 b/frontend/public/vendor/fonts/k2d-600-latin-ext.woff2 new file mode 100644 index 0000000..b8f20b8 Binary files /dev/null and b/frontend/public/vendor/fonts/k2d-600-latin-ext.woff2 differ diff --git a/frontend/public/vendor/fonts/k2d-600-latin.woff2 b/frontend/public/vendor/fonts/k2d-600-latin.woff2 new file mode 100644 index 0000000..677a435 Binary files /dev/null and b/frontend/public/vendor/fonts/k2d-600-latin.woff2 differ diff --git a/frontend/public/vendor/fonts/k2d-600-thai.woff2 b/frontend/public/vendor/fonts/k2d-600-thai.woff2 new file mode 100644 index 0000000..2214eec Binary files /dev/null and b/frontend/public/vendor/fonts/k2d-600-thai.woff2 differ diff --git a/frontend/public/vendor/fonts/k2d-700-latin-ext.woff2 b/frontend/public/vendor/fonts/k2d-700-latin-ext.woff2 new file mode 100644 index 0000000..b0da5f8 Binary files /dev/null and b/frontend/public/vendor/fonts/k2d-700-latin-ext.woff2 differ diff --git a/frontend/public/vendor/fonts/k2d-700-latin.woff2 b/frontend/public/vendor/fonts/k2d-700-latin.woff2 new file mode 100644 index 0000000..b44ff05 Binary files /dev/null and b/frontend/public/vendor/fonts/k2d-700-latin.woff2 differ diff --git a/frontend/public/vendor/fonts/k2d-700-thai.woff2 b/frontend/public/vendor/fonts/k2d-700-thai.woff2 new file mode 100644 index 0000000..b6d29c9 Binary files /dev/null and b/frontend/public/vendor/fonts/k2d-700-thai.woff2 differ diff --git a/frontend/public/vendor/fonts/k2d-800-latin-ext.woff2 b/frontend/public/vendor/fonts/k2d-800-latin-ext.woff2 new file mode 100644 index 0000000..bd0a205 Binary files /dev/null and b/frontend/public/vendor/fonts/k2d-800-latin-ext.woff2 differ diff --git a/frontend/public/vendor/fonts/k2d-800-latin.woff2 b/frontend/public/vendor/fonts/k2d-800-latin.woff2 new file mode 100644 index 0000000..637ae15 Binary files /dev/null and b/frontend/public/vendor/fonts/k2d-800-latin.woff2 differ diff --git a/frontend/public/vendor/fonts/k2d-800-thai.woff2 b/frontend/public/vendor/fonts/k2d-800-thai.woff2 new file mode 100644 index 0000000..ee74a3c Binary files /dev/null and b/frontend/public/vendor/fonts/k2d-800-thai.woff2 differ diff --git a/frontend/public/vendor/fonts/k2d.css b/frontend/public/vendor/fonts/k2d.css new file mode 100644 index 0000000..e1cb963 --- /dev/null +++ b/frontend/public/vendor/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/vendor/leaflet/leaflet.css b/frontend/public/vendor/leaflet/leaflet.css new file mode 100644 index 0000000..9ade8dc --- /dev/null +++ b/frontend/public/vendor/leaflet/leaflet.css @@ -0,0 +1,661 @@ +/* required styles */ + +.leaflet-pane, +.leaflet-tile, +.leaflet-marker-icon, +.leaflet-marker-shadow, +.leaflet-tile-container, +.leaflet-pane > svg, +.leaflet-pane > canvas, +.leaflet-zoom-box, +.leaflet-image-layer, +.leaflet-layer { + position: absolute; + left: 0; + top: 0; + } +.leaflet-container { + overflow: hidden; + } +.leaflet-tile, +.leaflet-marker-icon, +.leaflet-marker-shadow { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-user-drag: none; + } +/* Prevents IE11 from highlighting tiles in blue */ +.leaflet-tile::selection { + background: transparent; +} +/* Safari renders non-retina tile on retina better with this, but Chrome is worse */ +.leaflet-safari .leaflet-tile { + image-rendering: -webkit-optimize-contrast; + } +/* hack that prevents hw layers "stretching" when loading new tiles */ +.leaflet-safari .leaflet-tile-container { + width: 1600px; + height: 1600px; + -webkit-transform-origin: 0 0; + } +.leaflet-marker-icon, +.leaflet-marker-shadow { + display: block; + } +/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ +/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ +.leaflet-container .leaflet-overlay-pane svg { + max-width: none !important; + max-height: none !important; + } +.leaflet-container .leaflet-marker-pane img, +.leaflet-container .leaflet-shadow-pane img, +.leaflet-container .leaflet-tile-pane img, +.leaflet-container img.leaflet-image-layer, +.leaflet-container .leaflet-tile { + max-width: none !important; + max-height: none !important; + width: auto; + padding: 0; + } + +.leaflet-container img.leaflet-tile { + /* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */ + mix-blend-mode: plus-lighter; +} + +.leaflet-container.leaflet-touch-zoom { + -ms-touch-action: pan-x pan-y; + touch-action: pan-x pan-y; + } +.leaflet-container.leaflet-touch-drag { + -ms-touch-action: pinch-zoom; + /* Fallback for FF which doesn't support pinch-zoom */ + touch-action: none; + touch-action: pinch-zoom; +} +.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom { + -ms-touch-action: none; + touch-action: none; +} +.leaflet-container { + -webkit-tap-highlight-color: transparent; +} +.leaflet-container a { + -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4); +} +.leaflet-tile { + filter: inherit; + visibility: hidden; + } +.leaflet-tile-loaded { + visibility: inherit; + } +.leaflet-zoom-box { + width: 0; + height: 0; + -moz-box-sizing: border-box; + box-sizing: border-box; + z-index: 800; + } +/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ +.leaflet-overlay-pane svg { + -moz-user-select: none; + } + +.leaflet-pane { z-index: 400; } + +.leaflet-tile-pane { z-index: 200; } +.leaflet-overlay-pane { z-index: 400; } +.leaflet-shadow-pane { z-index: 500; } +.leaflet-marker-pane { z-index: 600; } +.leaflet-tooltip-pane { z-index: 650; } +.leaflet-popup-pane { z-index: 700; } + +.leaflet-map-pane canvas { z-index: 100; } +.leaflet-map-pane svg { z-index: 200; } + +.leaflet-vml-shape { + width: 1px; + height: 1px; + } +.lvml { + behavior: url(#default#VML); + display: inline-block; + position: absolute; + } + + +/* control positioning */ + +.leaflet-control { + position: relative; + z-index: 800; + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; + } +.leaflet-top, +.leaflet-bottom { + position: absolute; + z-index: 1000; + pointer-events: none; + } +.leaflet-top { + top: 0; + } +.leaflet-right { + right: 0; + } +.leaflet-bottom { + bottom: 0; + } +.leaflet-left { + left: 0; + } +.leaflet-control { + float: left; + clear: both; + } +.leaflet-right .leaflet-control { + float: right; + } +.leaflet-top .leaflet-control { + margin-top: 10px; + } +.leaflet-bottom .leaflet-control { + margin-bottom: 10px; + } +.leaflet-left .leaflet-control { + margin-left: 10px; + } +.leaflet-right .leaflet-control { + margin-right: 10px; + } + + +/* zoom and fade animations */ + +.leaflet-fade-anim .leaflet-popup { + opacity: 0; + -webkit-transition: opacity 0.2s linear; + -moz-transition: opacity 0.2s linear; + transition: opacity 0.2s linear; + } +.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { + opacity: 1; + } +.leaflet-zoom-animated { + -webkit-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; + } +svg.leaflet-zoom-animated { + will-change: transform; +} + +.leaflet-zoom-anim .leaflet-zoom-animated { + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); + -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); + transition: transform 0.25s cubic-bezier(0,0,0.25,1); + } +.leaflet-zoom-anim .leaflet-tile, +.leaflet-pan-anim .leaflet-tile { + -webkit-transition: none; + -moz-transition: none; + transition: none; + } + +.leaflet-zoom-anim .leaflet-zoom-hide { + visibility: hidden; + } + + +/* cursors */ + +.leaflet-interactive { + cursor: pointer; + } +.leaflet-grab { + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; + } +.leaflet-crosshair, +.leaflet-crosshair .leaflet-interactive { + cursor: crosshair; + } +.leaflet-popup-pane, +.leaflet-control { + cursor: auto; + } +.leaflet-dragging .leaflet-grab, +.leaflet-dragging .leaflet-grab .leaflet-interactive, +.leaflet-dragging .leaflet-marker-draggable { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; + } + +/* marker & overlays interactivity */ +.leaflet-marker-icon, +.leaflet-marker-shadow, +.leaflet-image-layer, +.leaflet-pane > svg path, +.leaflet-tile-container { + pointer-events: none; + } + +.leaflet-marker-icon.leaflet-interactive, +.leaflet-image-layer.leaflet-interactive, +.leaflet-pane > svg path.leaflet-interactive, +svg.leaflet-image-layer.leaflet-interactive path { + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; + } + +/* visual tweaks */ + +.leaflet-container { + background: #ddd; + outline-offset: 1px; + } +.leaflet-container a { + color: #0078A8; + } +.leaflet-zoom-box { + border: 2px dotted #38f; + background: rgba(255,255,255,0.5); + } + + +/* general typography */ +.leaflet-container { + font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; + font-size: 12px; + font-size: 0.75rem; + line-height: 1.5; + } + + +/* general toolbar styles */ + +.leaflet-bar { + box-shadow: 0 1px 5px rgba(0,0,0,0.65); + border-radius: 4px; + } +.leaflet-bar a { + background-color: #fff; + border-bottom: 1px solid #ccc; + width: 26px; + height: 26px; + line-height: 26px; + display: block; + text-align: center; + text-decoration: none; + color: black; + } +.leaflet-bar a, +.leaflet-control-layers-toggle { + background-position: 50% 50%; + background-repeat: no-repeat; + display: block; + } +.leaflet-bar a:hover, +.leaflet-bar a:focus { + background-color: #f4f4f4; + } +.leaflet-bar a:first-child { + border-top-left-radius: 4px; + border-top-right-radius: 4px; + } +.leaflet-bar a:last-child { + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + border-bottom: none; + } +.leaflet-bar a.leaflet-disabled { + cursor: default; + background-color: #f4f4f4; + color: #bbb; + } + +.leaflet-touch .leaflet-bar a { + width: 30px; + height: 30px; + line-height: 30px; + } +.leaflet-touch .leaflet-bar a:first-child { + border-top-left-radius: 2px; + border-top-right-radius: 2px; + } +.leaflet-touch .leaflet-bar a:last-child { + border-bottom-left-radius: 2px; + border-bottom-right-radius: 2px; + } + +/* zoom control */ + +.leaflet-control-zoom-in, +.leaflet-control-zoom-out { + font: bold 18px 'Lucida Console', Monaco, monospace; + text-indent: 1px; + } + +.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out { + font-size: 22px; + } + + +/* layers control */ + +.leaflet-control-layers { + box-shadow: 0 1px 5px rgba(0,0,0,0.4); + background: #fff; + border-radius: 5px; + } +.leaflet-control-layers-toggle { + background-image: url(images/layers.png); + width: 36px; + height: 36px; + } +.leaflet-retina .leaflet-control-layers-toggle { + background-image: url(images/layers-2x.png); + background-size: 26px 26px; + } +.leaflet-touch .leaflet-control-layers-toggle { + width: 44px; + height: 44px; + } +.leaflet-control-layers .leaflet-control-layers-list, +.leaflet-control-layers-expanded .leaflet-control-layers-toggle { + display: none; + } +.leaflet-control-layers-expanded .leaflet-control-layers-list { + display: block; + position: relative; + } +.leaflet-control-layers-expanded { + padding: 6px 10px 6px 6px; + color: #333; + background: #fff; + } +.leaflet-control-layers-scrollbar { + overflow-y: scroll; + overflow-x: hidden; + padding-right: 5px; + } +.leaflet-control-layers-selector { + margin-top: 2px; + position: relative; + top: 1px; + } +.leaflet-control-layers label { + display: block; + font-size: 13px; + font-size: 1.08333em; + } +.leaflet-control-layers-separator { + height: 0; + border-top: 1px solid #ddd; + margin: 5px -10px 5px -6px; + } + +/* Default icon URLs */ +.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */ + background-image: url(images/marker-icon.png); + } + + +/* attribution and scale controls */ + +.leaflet-container .leaflet-control-attribution { + background: #fff; + background: rgba(255, 255, 255, 0.8); + margin: 0; + } +.leaflet-control-attribution, +.leaflet-control-scale-line { + padding: 0 5px; + color: #333; + line-height: 1.4; + } +.leaflet-control-attribution a { + text-decoration: none; + } +.leaflet-control-attribution a:hover, +.leaflet-control-attribution a:focus { + text-decoration: underline; + } +.leaflet-attribution-flag { + display: inline !important; + vertical-align: baseline !important; + width: 1em; + height: 0.6669em; + } +.leaflet-left .leaflet-control-scale { + margin-left: 5px; + } +.leaflet-bottom .leaflet-control-scale { + margin-bottom: 5px; + } +.leaflet-control-scale-line { + border: 2px solid #777; + border-top: none; + line-height: 1.1; + padding: 2px 5px 1px; + white-space: nowrap; + -moz-box-sizing: border-box; + box-sizing: border-box; + background: rgba(255, 255, 255, 0.8); + text-shadow: 1px 1px #fff; + } +.leaflet-control-scale-line:not(:first-child) { + border-top: 2px solid #777; + border-bottom: none; + margin-top: -2px; + } +.leaflet-control-scale-line:not(:first-child):not(:last-child) { + border-bottom: 2px solid #777; + } + +.leaflet-touch .leaflet-control-attribution, +.leaflet-touch .leaflet-control-layers, +.leaflet-touch .leaflet-bar { + box-shadow: none; + } +.leaflet-touch .leaflet-control-layers, +.leaflet-touch .leaflet-bar { + border: 2px solid rgba(0,0,0,0.2); + background-clip: padding-box; + } + + +/* popup */ + +.leaflet-popup { + position: absolute; + text-align: center; + margin-bottom: 20px; + } +.leaflet-popup-content-wrapper { + padding: 1px; + text-align: left; + border-radius: 12px; + } +.leaflet-popup-content { + margin: 13px 24px 13px 20px; + line-height: 1.3; + font-size: 13px; + font-size: 1.08333em; + min-height: 1px; + } +.leaflet-popup-content p { + margin: 17px 0; + margin: 1.3em 0; + } +.leaflet-popup-tip-container { + width: 40px; + height: 20px; + position: absolute; + left: 50%; + margin-top: -1px; + margin-left: -20px; + overflow: hidden; + pointer-events: none; + } +.leaflet-popup-tip { + width: 17px; + height: 17px; + padding: 1px; + + margin: -10px auto 0; + pointer-events: auto; + + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); + } +.leaflet-popup-content-wrapper, +.leaflet-popup-tip { + background: white; + color: #333; + box-shadow: 0 3px 14px rgba(0,0,0,0.4); + } +.leaflet-container a.leaflet-popup-close-button { + position: absolute; + top: 0; + right: 0; + border: none; + text-align: center; + width: 24px; + height: 24px; + font: 16px/24px Tahoma, Verdana, sans-serif; + color: #757575; + text-decoration: none; + background: transparent; + } +.leaflet-container a.leaflet-popup-close-button:hover, +.leaflet-container a.leaflet-popup-close-button:focus { + color: #585858; + } +.leaflet-popup-scrolled { + overflow: auto; + } + +.leaflet-oldie .leaflet-popup-content-wrapper { + -ms-zoom: 1; + } +.leaflet-oldie .leaflet-popup-tip { + width: 24px; + margin: 0 auto; + + -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; + filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); + } + +.leaflet-oldie .leaflet-control-zoom, +.leaflet-oldie .leaflet-control-layers, +.leaflet-oldie .leaflet-popup-content-wrapper, +.leaflet-oldie .leaflet-popup-tip { + border: 1px solid #999; + } + + +/* div icon */ + +.leaflet-div-icon { + background: #fff; + border: 1px solid #666; + } + + +/* Tooltip */ +/* Base styles for the element that has a tooltip */ +.leaflet-tooltip { + position: absolute; + padding: 6px; + background-color: #fff; + border: 1px solid #fff; + border-radius: 3px; + color: #222; + white-space: nowrap; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; + box-shadow: 0 1px 3px rgba(0,0,0,0.4); + } +.leaflet-tooltip.leaflet-interactive { + cursor: pointer; + pointer-events: auto; + } +.leaflet-tooltip-top:before, +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + position: absolute; + pointer-events: none; + border: 6px solid transparent; + background: transparent; + content: ""; + } + +/* Directions */ + +.leaflet-tooltip-bottom { + margin-top: 6px; +} +.leaflet-tooltip-top { + margin-top: -6px; +} +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-top:before { + left: 50%; + margin-left: -6px; + } +.leaflet-tooltip-top:before { + bottom: 0; + margin-bottom: -12px; + border-top-color: #fff; + } +.leaflet-tooltip-bottom:before { + top: 0; + margin-top: -12px; + margin-left: -6px; + border-bottom-color: #fff; + } +.leaflet-tooltip-left { + margin-left: -6px; +} +.leaflet-tooltip-right { + margin-left: 6px; +} +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + top: 50%; + margin-top: -6px; + } +.leaflet-tooltip-left:before { + right: 0; + margin-right: -12px; + border-left-color: #fff; + } +.leaflet-tooltip-right:before { + left: 0; + margin-left: -12px; + border-right-color: #fff; + } + +/* Printing */ + +@media print { + /* Prevent printers from removing background-images of controls. */ + .leaflet-control { + -webkit-print-color-adjust: exact; + print-color-adjust: exact; + } + } diff --git a/frontend/public/vendor/leaflet/leaflet.js b/frontend/public/vendor/leaflet/leaflet.js new file mode 100644 index 0000000..a3bf693 --- /dev/null +++ b/frontend/public/vendor/leaflet/leaflet.js @@ -0,0 +1,6 @@ +/* @preserve + * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com + * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).leaflet={})}(this,function(t){"use strict";function l(t){for(var e,i,n=1,o=arguments.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=_(t);var e=this.min,i=this.max,n=t.min,t=t.max,o=t.x>=e.x&&n.x<=i.x,t=t.y>=e.y&&n.y<=i.y;return o&&t},overlaps:function(t){t=_(t);var e=this.min,i=this.max,n=t.min,t=t.max,o=t.x>e.x&&n.xe.y&&n.y=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=g(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),t=t.getNorthEast(),o=t.lat>=e.lat&&n.lat<=i.lat,t=t.lng>=e.lng&&n.lng<=i.lng;return o&&t},overlaps:function(t){t=g(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),t=t.getNorthEast(),o=t.lat>e.lat&&n.late.lng&&n.lng","http://www.w3.org/2000/svg"===(Wt.firstChild&&Wt.firstChild.namespaceURI));function y(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var b={ie:pt,ielt9:mt,edge:n,webkit:ft,android:gt,android23:vt,androidStock:yt,opera:xt,chrome:wt,gecko:bt,safari:Pt,phantom:Lt,opera12:o,win:Tt,ie3d:Mt,webkit3d:zt,gecko3d:_t,any3d:Ct,mobile:Zt,mobileWebkit:St,mobileWebkit3d:Et,msPointer:kt,pointer:Ot,touch:Bt,touchNative:At,mobileOpera:It,mobileGecko:Rt,retina:Nt,passiveEvents:Dt,canvas:jt,svg:Ht,vml:!Ht&&function(){try{var t=document.createElement("div"),e=(t.innerHTML='',t.firstChild);return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),inlineSvg:Wt,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},Ft=b.msPointer?"MSPointerDown":"pointerdown",Ut=b.msPointer?"MSPointerMove":"pointermove",Vt=b.msPointer?"MSPointerUp":"pointerup",qt=b.msPointer?"MSPointerCancel":"pointercancel",Gt={touchstart:Ft,touchmove:Ut,touchend:Vt,touchcancel:qt},Kt={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&O(e);ee(t,e)},touchmove:ee,touchend:ee,touchcancel:ee},Yt={},Xt=!1;function Jt(t,e,i){return"touchstart"!==e||Xt||(document.addEventListener(Ft,$t,!0),document.addEventListener(Ut,Qt,!0),document.addEventListener(Vt,te,!0),document.addEventListener(qt,te,!0),Xt=!0),Kt[e]?(i=Kt[e].bind(this,i),t.addEventListener(Gt[e],i,!1),i):(console.warn("wrong event specified:",e),u)}function $t(t){Yt[t.pointerId]=t}function Qt(t){Yt[t.pointerId]&&(Yt[t.pointerId]=t)}function te(t){delete Yt[t.pointerId]}function ee(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],Yt)e.touches.push(Yt[i]);e.changedTouches=[e],t(e)}}var ie=200;function ne(t,i){t.addEventListener("dblclick",i);var n,o=0;function e(t){var e;1!==t.detail?n=t.detail:"mouse"===t.pointerType||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents||((e=Ne(t)).some(function(t){return t instanceof HTMLLabelElement&&t.attributes.for})&&!e.some(function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement})||((e=Date.now())-o<=ie?2===++n&&i(function(t){var e,i,n={};for(i in t)e=t[i],n[i]=e&&e.bind?e.bind(t):e;return(t=n).type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}(t)):n=1,o=e))}return t.addEventListener("click",e),{dblclick:i,simDblclick:e}}var oe,se,re,ae,he,le,ue=we(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ce=we(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===ce||"OTransition"===ce?ce+"End":"transitionend";function _e(t){return"string"==typeof t?document.getElementById(t):t}function pe(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];return"auto"===(i=i&&"auto"!==i||!document.defaultView?i:(t=document.defaultView.getComputedStyle(t,null))?t[e]:null)?null:i}function P(t,e,i){t=document.createElement(t);return t.className=e||"",i&&i.appendChild(t),t}function T(t){var e=t.parentNode;e&&e.removeChild(t)}function me(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function fe(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ge(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ve(t,e){return void 0!==t.classList?t.classList.contains(e):0<(t=xe(t)).length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(t)}function M(t,e){var i;if(void 0!==t.classList)for(var n=F(e),o=0,s=n.length;othis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),t=this._limitCenter(i,this._zoom,g(t));return i.equals(t)||this.panTo(t,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=m((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=m(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),t=this.project(t),s=this.getPixelBounds(),i=_([s.min.add(i),s.max.subtract(n)]),s=i.getSize();return i.contains(t)||(this._enforcingBounds=!0,n=t.subtract(i.getCenter()),i=i.extend(t).getSize().subtract(s),o.x+=n.x<0?-i.x:i.x,o.y+=n.y<0?-i.y:i.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=l({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize(),i=(this._sizeChanged=!0,this._lastCenter=null,this.getSize()),n=e.divideBy(2).round(),o=i.divideBy(2).round(),n=n.subtract(o);return n.x||n.y?(t.animate&&t.pan?this.panBy(n):(t.pan&&this._rawPanBy(n),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){var e,i;return t=this._locateOptions=l({timeout:1e4,watch:!1},t),"geolocation"in navigator?(e=a(this._handleGeolocationResponse,this),i=a(this._handleGeolocationError,this),t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t)):this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e;this._container._leaflet_id&&(e=t.code,t=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout"),this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+t+"."}))},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e,i,n=new v(t.coords.latitude,t.coords.longitude),o=n.toBounds(2*t.coords.accuracy),s=this._locateOptions,r=(s.setView&&(e=this.getBoundsZoom(o),this.setView(n,s.maxZoom?Math.min(e,s.maxZoom):e)),{latlng:n,bounds:o,timestamp:t.timestamp});for(i in t.coords)"number"==typeof t.coords[i]&&(r[i]=t.coords[i]);this.fire("locationfound",r)}},addHandler:function(t,e){return e&&(e=this[t]=new e(this),this._handlers.push(e),this.options[t]&&e.enable()),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(var t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),T(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(r(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)T(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){e=P("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new s(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=g(t),i=m(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),t=t.getSouthEast(),i=this.getSize().subtract(i),t=_(this.project(t,n),this.project(r,n)).getSize(),r=b.any3d?this.options.zoomSnap:1,a=i.x/t.x,i=i.y/t.y,t=e?Math.max(a,i):Math.min(a,i),n=this.getScaleZoom(t,n);return r&&(n=Math.round(n/(r/100))*(r/100),n=e?Math.ceil(n/r)*r:Math.floor(n/r)*r),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new p(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){t=this._getTopLeftPoint(t,e);return new f(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs,t=(e=void 0===e?this._zoom:e,i.zoom(t*i.scale(e)));return isNaN(t)?1/0:t},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(w(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(m(t),e)},layerPointToLatLng:function(t){t=m(t).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(t){return this.project(w(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(w(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(g(t))},distance:function(t,e){return this.options.crs.distance(w(t),w(e))},containerPointToLayerPoint:function(t){return m(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return m(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){t=this.containerPointToLayerPoint(m(t));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(w(t)))},mouseEventToContainerPoint:function(t){return De(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){t=this._container=_e(t);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");S(t,"scroll",this._onScroll,this),this._containerId=h(t)},_initLayout:function(){var t=this._container,e=(this._fadeAnimated=this.options.fadeAnimation&&b.any3d,M(t,"leaflet-container"+(b.touch?" leaflet-touch":"")+(b.retina?" leaflet-retina":"")+(b.ielt9?" leaflet-oldie":"")+(b.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")),pe(t,"position"));"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Z(this._mapPane,new p(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(M(t.markerPane,"leaflet-zoom-hide"),M(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){Z(this._mapPane,new p(0,0));var n=!this._loaded,o=(this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset"),this._zoom!==e);this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return r(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Z(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var e=t?k:S;e((this._targets[h(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),b.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){r(this._resizeRequest),this._resizeRequest=x(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,r=!1;s;){if((i=this._targets[h(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){r=!0;break}if(i&&i.listens(e,!0)){if(o&&!We(s,t))break;if(n.push(i),o)break}if(s===this._container)break;s=s.parentNode}return n=n.length||r||o||!this.listens(e,!0)?n:[this]},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e,i=t.target||t.srcElement;!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i)||("mousedown"===(e=t.type)&&Me(i),this._fireDOMEvent(t,e))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){"click"===t.type&&((a=l({},t)).type="preclick",this._fireDOMEvent(a,a.type,i));var n=this._findEventTargets(t,e);if(i){for(var o=[],s=0;sthis.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),n=this._getCenterOffset(t)._divideBy(1-1/n);if(!0!==i.animate&&!this.getSize().contains(n))return!1;x(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this)}return!0},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,M(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&z(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Ue(t){return new B(t)}var B=et.extend({options:{position:"topright"},initialize:function(t){c(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),t=t._controlCorners[i];return M(e,"leaflet-control"),-1!==i.indexOf("bottom")?t.insertBefore(e,t.firstChild):t.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(T(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0",e=document.createElement("div");return e.innerHTML=t,e.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer),n=(t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+h(this),n),this._layerControlInputs.push(e),e.layerId=h(t.layer),S(e,"click",this._onInputClick,this),document.createElement("span")),o=(n.innerHTML=" "+t.name,document.createElement("span"));return i.appendChild(o),o.appendChild(e),o.appendChild(n),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){if(!this._preventClick){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=i.length-1;0<=s;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(s=0;se.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section,e=(this._preventClick=!0,S(t,"click",O),this.expand(),this);setTimeout(function(){k(t,"click",O),e._preventClick=!1})}})),qe=B.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=P("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){i=P("a",i,n);return i.innerHTML=t,i.href="#",i.title=e,i.setAttribute("role","button"),i.setAttribute("aria-label",e),Ie(i),S(i,"click",Re),S(i,"click",o,this),S(i,"click",this._refocusOnMap,this),i},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";z(this._zoomInButton,e),z(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&t._zoom!==t.getMinZoom()||(M(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&t._zoom!==t.getMaxZoom()||(M(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}}),Ge=(A.mergeOptions({zoomControl:!0}),A.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new qe,this.addControl(this.zoomControl))}),B.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=P("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=P("div",e,i)),t.imperial&&(this._iScale=P("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,t=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(t)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,i,t=3.2808399*t;5280'+(b.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){c(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=P("div","leaflet-control-attribution"),Ie(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t,e=[];for(t in this._attributions)this._attributions[t]&&e.push(t);var i=[];this.options.prefix&&i.push(this.options.prefix),e.length&&i.push(e.join(", ")),this._container.innerHTML=i.join(' ')}}}),n=(A.mergeOptions({attributionControl:!0}),A.addInitHook(function(){this.options.attributionControl&&(new Ke).addTo(this)}),B.Layers=Ve,B.Zoom=qe,B.Scale=Ge,B.Attribution=Ke,Ue.layers=function(t,e,i){return new Ve(t,e,i)},Ue.zoom=function(t){return new qe(t)},Ue.scale=function(t){return new Ge(t)},Ue.attribution=function(t){return new Ke(t)},et.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}})),ft=(n.addTo=function(t,e){return t.addHandler(e,this),this},{Events:e}),Ye=b.touch?"touchstart mousedown":"mousedown",Xe=it.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){c(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(S(this._dragStartTarget,Ye,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Xe._dragging===this&&this.finishDrag(!0),k(this._dragStartTarget,Ye,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var e,i;this._enabled&&(this._moved=!1,ve(this._element,"leaflet-zoom-anim")||(t.touches&&1!==t.touches.length?Xe._dragging===this&&this.finishDrag():Xe._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((Xe._dragging=this)._preventOutline&&Me(this._element),Le(),re(),this._moving||(this.fire("down"),i=t.touches?t.touches[0]:t,e=Ce(this._element),this._startPoint=new p(i.clientX,i.clientY),this._startPos=Pe(this._element),this._parentScale=Ze(e),i="mousedown"===t.type,S(document,i?"mousemove":"touchmove",this._onMove,this),S(document,i?"mouseup":"touchend touchcancel",this._onUp,this)))))},_onMove:function(t){var e;this._enabled&&(t.touches&&1e&&(i.push(t[n]),o=n);oe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function ri(t,e,i,n){var o=e.x,e=e.y,s=i.x-o,r=i.y-e,a=s*s+r*r;return 0this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(l=!l);return l||yi.prototype._containsPoint.call(this,t,!0)}});var wi=ci.extend({initialize:function(t,e){c(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=d(t)?t:t.features;if(o){for(e=0,i=o.length;es.x&&(r=i.x+a-s.x+o.x),i.x-r-n.x<(a=0)&&(r=i.x-n.x),i.y+e+o.y>s.y&&(a=i.y+e-s.y+o.y),i.y-a-n.y<0&&(a=i.y-n.y),(r||a)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([r,a]))))},_getAnchor:function(){return m(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}})),Ii=(A.mergeOptions({closePopupOnClick:!0}),A.include({openPopup:function(t,e,i){return this._initOverlay(Bi,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),o.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Bi,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof ci||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e;this._popup&&this._map&&(Re(t),e=t.layer||t.target,this._popup._source!==e||e instanceof fi?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}}),Ai.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ai.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ai.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ai.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=P("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+h(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i=this._map,n=this._container,o=i.latLngToContainerPoint(i.getCenter()),i=i.layerPointToContainerPoint(t),s=this.options.direction,r=n.offsetWidth,a=n.offsetHeight,h=m(this.options.offset),l=this._getAnchor(),i="top"===s?(e=r/2,a):"bottom"===s?(e=r/2,0):(e="center"===s?r/2:"right"===s?0:"left"===s?r:i.xthis.options.maxZoom||nthis.options.maxZoom||void 0!==this.options.minZoom&&oi.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}return!this.options.bounds||(e=this._tileCoordsToBounds(t),g(this.options.bounds).overlaps(e))},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),i=n.add(i);return[e.unproject(n,t.z),e.unproject(i,t.z)]},_tileCoordsToBounds:function(t){t=this._tileCoordsToNwSe(t),t=new s(t[0],t[1]);return t=this.options.noWrap?t:this._map.wrapLatLngBounds(t)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var t=t.split(":"),e=new p(+t[0],+t[1]);return e.z=+t[2],e},_removeTile:function(t){var e=this._tiles[t];e&&(T(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){M(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,b.ielt9&&this.options.opacity<1&&C(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),a(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&x(a(this._tileReady,this,t,null,o)),Z(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(C(i.el,0),r(this._fadeFrame),this._fadeFrame=x(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(M(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),b.ielt9||!this._map._fadeAnimated?x(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new p(this._wrapX?H(t.x,this._wrapX):t.x,this._wrapY?H(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new f(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var Di=Ni.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=c(this,e)).detectRetina&&b.retina&&0')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),zt={_initContainer:function(){this._container=P("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Wi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Vi("shape");M(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Vi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;T(e),t.removeInteractiveTarget(e),delete this._layers[h(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e=e||(t._stroke=Vi("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=d(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i=i||(t._fill=Vi("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){fe(t._container)},_bringToBack:function(t){ge(t._container)}},qi=b.vml?Vi:ct,Gi=Wi.extend({_initContainer:function(){this._container=qi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=qi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){T(this._container),k(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){var t,e,i;this._map._animatingZoom&&this._bounds||(Wi.prototype._update.call(this),e=(t=this._bounds).getSize(),i=this._container,this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),Z(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update"))},_initPath:function(t){var e=t._path=qi("path");t.options.className&&M(e,t.options.className),t.options.interactive&&M(e,"leaflet-interactive"),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){T(t._path),t.removeInteractiveTarget(t._path),delete this._layers[h(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,t=t.options;e&&(t.stroke?(e.setAttribute("stroke",t.color),e.setAttribute("stroke-opacity",t.opacity),e.setAttribute("stroke-width",t.weight),e.setAttribute("stroke-linecap",t.lineCap),e.setAttribute("stroke-linejoin",t.lineJoin),t.dashArray?e.setAttribute("stroke-dasharray",t.dashArray):e.removeAttribute("stroke-dasharray"),t.dashOffset?e.setAttribute("stroke-dashoffset",t.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),t.fill?(e.setAttribute("fill",t.fillColor||t.color),e.setAttribute("fill-opacity",t.fillOpacity),e.setAttribute("fill-rule",t.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,dt(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",e=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,e)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){fe(t._path)},_bringToBack:function(t){ge(t._path)}});function Ki(t){return b.svg||b.vml?new Gi(t):null}b.vml&&Gi.include(zt),A.include({getRenderer:function(t){t=(t=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(t){var e;return"overlayPane"!==t&&void 0!==t&&(void 0===(e=this._paneRenderers[t])&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e)},_createRenderer:function(t){return this.options.preferCanvas&&Ui(t)||Ki(t)}});var Yi=xi.extend({initialize:function(t,e){xi.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=g(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Gi.create=qi,Gi.pointsToPath=dt,wi.geometryToLayer=bi,wi.coordsToLatLng=Li,wi.coordsToLatLngs=Ti,wi.latLngToCoords=Mi,wi.latLngsToCoords=zi,wi.getFeature=Ci,wi.asFeature=Zi,A.mergeOptions({boxZoom:!0});var _t=n.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){S(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){k(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){T(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),re(),Le(),this._startPoint=this._map.mouseEventToContainerPoint(t),S(document,{contextmenu:Re,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=P("div","leaflet-zoom-box",this._container),M(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var t=new f(this._point,this._startPoint),e=t.getSize();Z(this._box,t.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(T(this._box),z(this._container,"leaflet-crosshair")),ae(),Te(),k(document,{contextmenu:Re,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0),t=new s(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})))},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}),Ct=(A.addInitHook("addHandler","boxZoom",_t),A.mergeOptions({doubleClickZoom:!0}),n.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,i=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}})),Zt=(A.addInitHook("addHandler","doubleClickZoom",Ct),A.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),n.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new Xe(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),M(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){z(this._map._container,"leaflet-grab"),z(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,e=this._map;e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=g(this._map.options.maxBounds),this._offsetLimit=_(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var e,i;this._map.options.inertia&&(e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(i),this._times.push(e),this._prunePositions(e)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,n=(n+e+i)%t-e-i,t=Math.abs(o+i)e.getMaxZoom()&&1 + + + + ); +} diff --git a/frontend/src/app/blog/[postId]/page.tsx b/frontend/src/app/blog/[postId]/page.tsx new file mode 100644 index 0000000..db387fc --- /dev/null +++ b/frontend/src/app/blog/[postId]/page.tsx @@ -0,0 +1,14 @@ +import BlogView from "@/components/views/BlogView"; +import PageRuntime from "@/components/PageRuntime"; + +export const metadata = { title: "บ่นไปเรื่อย" }; + +export default async function Page({ params }: { params: Promise<{ postId: string }> }) { + const { postId } = await params; + return ( + <> + + + + ); +} diff --git a/frontend/src/app/blog/page.tsx b/frontend/src/app/blog/page.tsx new file mode 100644 index 0000000..7bf00a9 --- /dev/null +++ b/frontend/src/app/blog/page.tsx @@ -0,0 +1,13 @@ +import BlogView from "@/components/views/BlogView"; +import PageRuntime from "@/components/PageRuntime"; + +export const metadata = { title: "บ่นไปเรื่อย" }; + +export default function Page() { + return ( + <> + + + + ); +} diff --git a/frontend/src/app/check/[routeId]/page.tsx b/frontend/src/app/check/[routeId]/page.tsx new file mode 100644 index 0000000..d4acf77 --- /dev/null +++ b/frontend/src/app/check/[routeId]/page.tsx @@ -0,0 +1,14 @@ +import CheckView from "@/components/views/CheckView"; +import PageRuntime from "@/components/PageRuntime"; + +export const metadata = { title: "เช็กเวลาเดินรถ" }; + +export default async function Page({ params }: { params: Promise<{ routeId: string }> }) { + const { routeId } = await params; + return ( + <> + + + + ); +} diff --git a/frontend/src/app/check/page.tsx b/frontend/src/app/check/page.tsx new file mode 100644 index 0000000..454c2e8 --- /dev/null +++ b/frontend/src/app/check/page.tsx @@ -0,0 +1,20 @@ +import CheckView from "@/components/views/CheckView"; +import PageRuntime from "@/components/PageRuntime"; + +export const metadata = { title: "เช็กเวลาเดินรถ" }; + +export default async function Page({ + searchParams, +}: { + searchParams: Promise>; +}) { + const sp = await searchParams; + const query: Record = {}; + if (typeof sp.route === "string") query.route = sp.route; + return ( + <> + + + + ); +} diff --git a/frontend/src/app/credits/page.tsx b/frontend/src/app/credits/page.tsx new file mode 100644 index 0000000..3433ed9 --- /dev/null +++ b/frontend/src/app/credits/page.tsx @@ -0,0 +1,7 @@ +import CreditsView from "@/components/views/CreditsView"; + +export const metadata = { title: "เครดิต" }; + +export default function Page() { + return ; +} diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css deleted file mode 100644 index 7d2e8c7..0000000 --- a/frontend/src/app/globals.css +++ /dev/null @@ -1,887 +0,0 @@ -/* ============================================================ - AT Transit — bold-creative light theme - Ported from flow_ui/ui/_shared.css + index.html inline styles - ============================================================ */ - -:root { - --bg: #f7f9fd; - --surface: #ffffff; - --ink: #1f2a44; - --ink-muted: #4a5876; - --muted: #6f7b95; - --line: #e9eef7; - - --sky-50: #dbeafe; --sky-700: #1d4ed8; - --purple-50: #ede9fe; --purple-700: #6d28d9; - --pink-50: #fce7f3; --pink-700: #be185d; - --mint-50: #d1fae5; --mint-700: #047857; - --green-50: #dcfce7; --green-700: #15803d; - --amber-50: #fef3c7; --amber-700: #b45309; - - --grad-sky: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%); - --grad-purple: linear-gradient(135deg, #8b5cf6 0%, #c084fc 100%); - --grad-pink: linear-gradient(135deg, #ec4899 0%, #f472b6 100%); - --grad-mint: linear-gradient(135deg, #10b981 0%, #34d399 100%); - --grad-amber: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%); - --grad-cta: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%); - - --radius: 16px; - --radius-lg: 22px; - --shadow-sm: 0 4px 14px rgba(20, 40, 90, .06); - --shadow-md: 0 10px 24px rgba(20, 40, 90, .10); - --shadow-lg: 0 18px 36px rgba(15, 23, 42, .14); -} - -* { box-sizing: border-box; } -html, body { margin: 0; padding: 0; } -body { - font-family: "Noto Sans Thai", "Prompt", "Sukhumvit Set", "Sarabun", - system-ui, -apple-system, sans-serif; - background: var(--bg); - color: var(--ink); - min-height: 100vh; -} -a { color: inherit; text-decoration: none; } -img { max-width: 100%; display: block; } - -/* ---------- Layout helpers ---------- */ -.container { max-width: 1200px; margin: 0 auto; padding: 0 28px; } -@media (max-width: 640px) { .container { padding: 0 18px; } } -.main { padding: 40px 0 24px; } - -/* ---------- Topbar ---------- */ -.topbar { - position: sticky; top: 0; z-index: 50; - background: #ffffff; - border-bottom: 1px solid var(--line); - box-shadow: 0 2px 8px rgba(20, 40, 90, .04); -} -.topbar__inner { - display: flex; align-items: center; gap: 18px; - padding: 14px 28px; max-width: 1200px; margin: 0 auto; -} -.brand { display: flex; align-items: center; gap: 12px; } -.brand__logo { - width: 44px; height: 44px; border-radius: 12px; - background: var(--grad-cta); - padding: 4px; -} -.brand__title { margin: 0; font-weight: 800; font-size: 1.05rem; color: var(--ink); } -.brand__subtitle { margin: 0; font-size: .72rem; color: var(--muted); } - -.nav { margin-left: auto; display: flex; gap: 28px; } -.nav a { - color: var(--ink-muted); font-size: .92rem; font-weight: 600; - padding: 6px 4px; border-bottom: 2px solid transparent; transition: color .15s; -} -.nav a.active { color: var(--pink-700); border-bottom-color: #ec4899; } -.nav a:hover { color: var(--ink); } - -.cta-pill { - background: var(--grad-cta); color: #fff; padding: 10px 22px; - border-radius: 999px; font-weight: 700; font-size: .88rem; - box-shadow: 0 6px 14px rgba(124, 58, 237, .3); - display: inline-block; -} - -@media (max-width: 820px) { - .nav { display: none; } - .brand__subtitle { display: none; } -} - -/* ---------- Hero ---------- */ -.hero { - position: relative; overflow: hidden; - padding: 56px 0 64px; - background: linear-gradient(180deg, #f0ebff 0%, #ffe8ee 50%, #fff4d6 100%); - text-align: center; -} -.hero__blob { - position: absolute; border-radius: 50%; - filter: blur(50px); opacity: .55; z-index: 0; -} -.hero__blob.one { width: 220px; height: 220px; background: #b794f4; top: -50px; left: 8%; } -.hero__blob.two { width: 260px; height: 260px; background: #f9a8d4; top: 40%; right: 8%; } -.hero__blob.three { width: 180px; height: 180px; background: #fde68a; bottom: -40px; left: 38%; } -.hero__inner { position: relative; z-index: 1; } - -.hero__badge { - display: inline-block; - background: rgba(255, 255, 255, .8); - backdrop-filter: blur(6px); - color: var(--purple-700); - padding: 6px 16px; border-radius: 999px; - font-size: .82rem; font-weight: 700; - margin-bottom: 18px; - box-shadow: 0 4px 10px rgba(124, 58, 237, .12); -} -.hero h1 { - margin: 0 0 26px; - font-size: clamp(1.6rem, 4vw, 2.4rem); - font-weight: 800; line-height: 1.35; color: var(--ink); -} -.hero__lead { - margin: -6px auto 0; - max-width: 640px; - color: var(--ink-muted); - font-size: 1rem; - line-height: 1.7; -} -.hero__grad { - background: linear-gradient(120deg, #d946ef 10%, #a855f7 60%, #6366f1 100%); - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; - background-clip: text; -} -.hero__actions { - margin: 28px auto 0; - display: grid; - grid-template-columns: repeat(3, minmax(0, 1fr)); - gap: 14px; - max-width: 860px; -} -.pill-link { - display: flex; - align-items: center; - justify-content: center; - min-height: 58px; - background: rgba(255, 255, 255, .88); - color: var(--ink); - padding: 12px 18px; - border-radius: 18px; - font-weight: 800; - font-size: .98rem; - border: 1px solid rgba(124, 58, 237, .18); - box-shadow: 0 10px 22px rgba(40, 60, 120, .10); - transition: transform .15s, box-shadow .15s, border-color .15s; -} -.pill-link:hover { transform: translateY(-2px); box-shadow: 0 14px 24px rgba(40, 60, 120, .16); } -.pill-link--primary { - background: var(--grad-cta); - color: #fff; - border-color: transparent; -} -.pill-link--secondary { - background: rgba(255, 255, 255, .95); - border-color: rgba(59, 130, 246, .22); -} -.pill-link--accent { - background: rgba(255, 255, 255, .95); - border-color: rgba(236, 72, 153, .22); -} - -@media (max-width: 900px) { - .hero__actions { grid-template-columns: 1fr; } -} - -/* ---------- Zones / Cards ---------- */ -.zone { margin-bottom: 36px; } -.zone__head { - display: flex; align-items: center; gap: 14px; margin-bottom: 14px; - flex-wrap: wrap; -} -.zone__tag { - padding: 5px 14px; border-radius: 999px; - font-size: .82rem; font-weight: 700; -} -.zone__tag.sky { background: var(--sky-50); color: var(--sky-700); } -.zone__tag.purple { background: var(--purple-50); color: var(--purple-700); } -.zone__tag.pink { background: var(--pink-50); color: var(--pink-700); } -.zone__tag.mint { background: var(--mint-50); color: var(--mint-700); } -.zone__desc { color: var(--muted); font-size: .88rem; margin: 0; } - -.grid { - display: grid; gap: 18px; - grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); -} - -.card { - display: block; background: #fff; border-radius: var(--radius); - overflow: hidden; box-shadow: var(--shadow-sm); - transition: transform .18s ease, box-shadow .18s ease; - color: inherit; -} -.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); } - -.card__head { - height: 130px; display: flex; align-items: center; justify-content: center; - position: relative; -} -.card__head.sky { background: var(--grad-sky); } -.card__head.purple { background: var(--grad-purple); } -.card__head.pink { background: var(--grad-pink); } -.card__head.mint { background: var(--grad-mint); } -.card__head.amber { background: var(--grad-amber); } - -.card__num { - color: #fff; font-size: 52px; font-weight: 900; - text-shadow: 0 4px 12px rgba(0, 0, 0, .25); - letter-spacing: .02em; margin: 0; -} -.card__body { padding: 14px 16px 16px; } -.card__name { - margin: 0 0 10px; font-size: .9rem; color: var(--ink); font-weight: 700; - line-height: 1.4; -} -.card__chips { display: flex; flex-wrap: wrap; gap: 6px; } -.card__icon { - font-size: 56px; line-height: 1; - filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .25)); -} -.chip { - display: inline-block; padding: 4px 12px; border-radius: 999px; - font-size: .78rem; font-weight: 700; -} -.chip.sky { background: var(--sky-50); color: var(--sky-700); } -.chip.purple { background: var(--purple-50); color: var(--purple-700); } -.chip.pink { background: var(--pink-50); color: var(--pink-700); } -.chip.mint { background: var(--mint-50); color: var(--mint-700); } -.chip.green { background: var(--green-50); color: var(--green-700); } -.chip.amber { background: var(--amber-50); color: var(--amber-700); } - -/* ---------- Stats summary ---------- */ -.summary { padding: 8px 0 40px; } -.summary__grid { - display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; -} -.stat { - padding: 28px 18px; text-align: center; - border-radius: 18px; margin: 0; -} -.stat h3 { margin: 0 0 4px; font-size: 2rem; color: var(--ink); font-weight: 800; } -.stat p { margin: 0; font-size: .82rem; color: var(--ink-muted); font-weight: 600; } -.stat.pink { background: var(--pink-50); } -.stat.sky { background: var(--sky-50); } -.stat.purple { background: var(--purple-50); } -.stat.mint { background: var(--mint-50); } -@media (max-width: 720px) { - .summary__grid { grid-template-columns: repeat(2, 1fr); } -} - -/* ---------- Generic content (routes/stops detail pages) ---------- */ -.page { max-width: 1200px; margin: 0 auto; padding: 28px 28px 60px; } -.section-title { margin: 28px 0 14px; font-size: 1.25rem; color: var(--ink); font-weight: 800; } -.muted { color: var(--muted); } - -.panel { - background: #fff; border-radius: var(--radius); - box-shadow: var(--shadow-sm); padding: 22px 24px; - border: 1px solid var(--line); -} -.crumbs { color: var(--muted); font-size: .85rem; margin: 8px 0 12px; } -.crumbs a { color: var(--purple-700); font-weight: 600; } -.crumbs a:hover { text-decoration: underline; } - -.pill { - display: inline-block; padding: 5px 12px; border-radius: 999px; - background: var(--purple-50); color: var(--purple-700); - font-size: .78rem; font-weight: 700; -} -.pill--alt { background: var(--pink-50); color: var(--pink-700); } - -.table { - width: 100%; border-collapse: separate; border-spacing: 0; - margin-top: 14px; - background: linear-gradient(180deg, #ffffff 0%, #fbfbff 100%); - border-radius: var(--radius); overflow: hidden; - border: 1px solid var(--line); - box-shadow: var(--shadow-sm); -} -.table th, .table td { padding: 14px 18px; text-align: left; font-size: .92rem; } -.table th { - background: linear-gradient(180deg, #f3eefe 0%, #fde7f0 100%); - color: var(--ink); font-weight: 800; - font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; - border-bottom: 1px solid var(--line); -} -.table tr + tr td { border-top: 1px solid var(--line); } -.table tbody tr:hover td { background: #faf8ff; } - -.map-wrap { - height: 360px; border-radius: var(--radius); overflow: hidden; - border: 1px solid var(--line); -} - -/* ---------- Stop detail (map + gallery) ---------- */ -.stop-detail__split { - display: grid; - grid-template-columns: 1.1fr 1fr; - gap: 18px; - margin-bottom: 8px; -} -@media (max-width: 900px) { - .stop-detail__split { grid-template-columns: 1fr; } -} -.stop-detail__gallery { - display: flex; flex-direction: column; gap: 10px; - background: #fff; border-radius: var(--radius); - border: 1px solid var(--line); box-shadow: var(--shadow-sm); - overflow: hidden; -} -.stop-detail__gallery--empty, -.stop-detail__map--empty { - display: flex; align-items: center; justify-content: center; - min-height: 320px; background: #f4f6fc; color: var(--muted); -} -.stop-detail__hero-img { - width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; -} -.stop-detail__thumbs { - display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; - padding: 0 10px 10px; -} -.stop-detail__thumbs img { - width: 100%; aspect-ratio: 1 / 1; object-fit: cover; - border-radius: 10px; border: 1px solid var(--line); -} -.stop-detail__map { - height: 100%; min-height: 360px; - border-radius: var(--radius); overflow: hidden; - border: 1px solid var(--line); box-shadow: var(--shadow-sm); - background: #e5edf7; -} -.stop-detail__placeholder { - font-size: .95rem; font-weight: 600; -} - -/* ---------- Schedule card list (soft gradient, modern) ---------- */ -.schedule-list { - display: grid; gap: 14px; margin-top: 14px; -} -.schedule-card { - position: relative; - display: grid; grid-template-columns: minmax(220px, 320px) 1fr; - gap: 18px; align-items: center; - padding: 18px 20px 18px 26px; - background: linear-gradient(135deg, #ffffff 0%, #fbfaff 60%, #fff5fb 100%); - border: 1px solid var(--line); - border-radius: var(--radius-lg); - box-shadow: var(--shadow-sm); - overflow: hidden; - transition: transform .15s ease, box-shadow .15s ease; -} -.schedule-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); } -.schedule-card__rail { - position: absolute; left: 0; top: 0; bottom: 0; width: 6px; - background: var(--grad-cta); -} -.schedule-card--sky .schedule-card__rail { background: var(--grad-sky); } -.schedule-card--purple .schedule-card__rail { background: var(--grad-purple); } -.schedule-card--pink .schedule-card__rail { background: var(--grad-pink); } -.schedule-card--mint .schedule-card__rail { background: var(--grad-mint); } -.schedule-card--amber .schedule-card__rail { background: var(--grad-amber); } -.schedule-card--sky { background: linear-gradient(135deg, #ffffff 0%, #f0f6ff 100%); } -.schedule-card--purple { background: linear-gradient(135deg, #ffffff 0%, #f6f1ff 100%); } -.schedule-card--pink { background: linear-gradient(135deg, #ffffff 0%, #fff0f7 100%); } -.schedule-card--mint { background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%); } -.schedule-card--amber { background: linear-gradient(135deg, #ffffff 0%, #fff7e8 100%); } - -.schedule-card__head { - display: flex; flex-direction: column; gap: 10px; -} -.schedule-card__route { - display: inline-flex; flex-direction: column; align-items: flex-start; - padding: 10px 16px; border-radius: 14px; - color: #fff; min-width: 140px; - box-shadow: 0 8px 18px rgba(15, 23, 42, .15); - background: var(--grad-cta); -} -.schedule-card__route.sky { background: var(--grad-sky); } -.schedule-card__route.purple { background: var(--grad-purple); } -.schedule-card__route.pink { background: var(--grad-pink); } -.schedule-card__route.mint { background: var(--grad-mint); } -.schedule-card__route.amber { background: var(--grad-amber); } -.schedule-card__route-label { - font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; - opacity: .85; font-weight: 700; -} -.schedule-card__route-id { - font-size: 1.5rem; font-weight: 900; letter-spacing: .02em; line-height: 1.1; -} -.schedule-card__meta { - display: flex; flex-direction: column; gap: 4px; -} -.schedule-card__direction { - display: inline-flex; align-items: center; gap: 6px; - font-weight: 700; color: var(--ink); font-size: .92rem; -} -.schedule-card__note { - font-size: .82rem; color: var(--ink-muted); -} - -.schedule-card__times { - display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; -} -.schedule-card__time { - display: inline-flex; align-items: center; gap: 5px; - padding: 7px 12px; border-radius: 999px; - font-size: .88rem; font-weight: 700; letter-spacing: .02em; - color: var(--ink); - background: linear-gradient(135deg, #ffffff 0%, #f3eefe 100%); - border: 1px solid #e3d9fb; - box-shadow: 0 2px 6px rgba(124, 58, 237, .08); -} -.schedule-card__time:hover { - background: var(--grad-cta); color: #fff; border-color: transparent; -} -.schedule-card__empty { - font-size: .85rem; color: var(--muted); font-style: italic; -} - -@media (max-width: 720px) { - .schedule-card { grid-template-columns: 1fr; gap: 12px; padding: 16px 16px 16px 22px; } - .schedule-card__route { width: 100%; } -} - -/* Detail-page hero (inside .page wrapper) */ -.page > .hero { - border-radius: var(--radius-lg); - margin-bottom: 22px; - padding: 30px 28px; - text-align: left; - background: linear-gradient(135deg, #ede9fe 0%, #fce7f3 100%); -} -.page > .hero h1 { - font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 6px 0 10px; -} - -/* ---------- Footer (rich dark) ---------- */ -.footer { - margin-top: 48px; - background: - radial-gradient(circle at 0% 0%, rgba(122, 76, 192, .35), transparent 35%), - radial-gradient(circle at 100% 10%, rgba(48, 113, 184, .35), transparent 35%), - linear-gradient(180deg, #1a1830 0%, #0f1126 100%); - color: #cfd5ec; - padding: 48px 0 0; -} -.footer .container { max-width: 1200px; margin: 0 auto; padding: 0 24px; } -.footer__grid { - display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 28px; -} -.footer__brand { display: flex; flex-direction: column; gap: 12px; } -.footer__brand-row { display: flex; align-items: center; gap: 12px; } -.footer__brand-row img { - width: 48px; height: 48px; border-radius: 12px; - background: #fff; padding: 4px; object-fit: contain; -} -.footer__brand-row strong { - display: block; color: #fff; font-size: 1.05rem; - font-weight: 800; letter-spacing: .01em; -} -.footer__brand-row span { display: block; color: #9aa3c3; font-size: .82rem; margin-top: 2px; } -.footer__brand p { margin: 0; color: #b6bdda; font-size: .88rem; line-height: 1.6; } - -.footer__col h4 { - margin: 0 0 14px; color: #fff; font-size: .9rem; - font-weight: 800; letter-spacing: .03em; text-transform: uppercase; -} -.footer__col ul { - list-style: none; padding: 0; margin: 0; - display: flex; flex-direction: column; gap: 8px; -} -.footer__col ul a { - color: #cfd5ec; font-size: .9rem; transition: color .15s; - display: inline-flex; align-items: center; gap: 8px; -} -.footer__col ul a::before { content: "›"; color: #a855f7; font-weight: 800; } -.footer__col ul a:hover { color: #fff; } -.footer__contact .row { margin-bottom: 8px; } -.footer__contact a, .footer__contact span { - display: inline-flex; align-items: center; gap: 8px; - color: #cfd5ec; font-size: .88rem; -} - -.footer__sponsors { - margin-top: 36px; padding-top: 28px; - border-top: 1px solid rgba(255, 255, 255, .08); -} -.footer__sponsors h4 { margin: 0 0 6px; color: #fff; font-size: .95rem; font-weight: 800; } -.footer__sponsors .lead { margin: 0 0 18px; color: #9aa3c3; font-size: .85rem; } -.sponsor-strip { - display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; -} -.sponsor-tile { - background: #fff; border-radius: 12px; padding: 10px; - display: flex; align-items: center; justify-content: center; - aspect-ratio: 5 / 3; overflow: hidden; - transition: transform .15s, box-shadow .15s; -} -.sponsor-tile img { - width: 100%; height: 100%; - object-fit: contain; -} -.sponsor-tile:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(0, 0, 0, .35); } - -.footer__bottom { - margin-top: 36px; padding: 18px 0 22px; - border-top: 1px solid rgba(255, 255, 255, .08); - text-align: center; -} -.footer__bottom p { margin: 0; color: #8d96b8; font-size: .82rem; letter-spacing: .02em; } -.footer__bottom .pill { - display: inline-block; margin-left: 10px; padding: 2px 10px; - border-radius: 999px; background: rgba(122, 76, 192, .25); - color: #d8c7ff; font-size: .72rem; font-weight: 700; -} - -@media (max-width: 980px) { .footer__grid { grid-template-columns: 1fr 1fr; } } -@media (max-width: 640px) { - .footer__grid { grid-template-columns: 1fr; } - .footer { padding: 36px 0 0; } -} - -/* ============================================================ - Modern soft-gradient list pages (/stops, /routes) - ============================================================ */ -.page-hero { - position: relative; overflow: hidden; - border-radius: var(--radius-lg); - padding: 44px 36px 38px; - margin-bottom: 22px; - background: - radial-gradient(120% 140% at 0% 0%, #ede9fe 0%, transparent 55%), - radial-gradient(120% 140% at 100% 0%, #fce7f3 0%, transparent 55%), - radial-gradient(120% 140% at 50% 120%, #fef3c7 0%, transparent 55%), - linear-gradient(135deg, #ffffff 0%, #fbfaff 100%); - border: 1px solid rgba(168, 85, 247, .12); - box-shadow: var(--shadow-sm); -} -.page-hero--alt { - background: - radial-gradient(120% 140% at 0% 0%, #dbeafe 0%, transparent 55%), - radial-gradient(120% 140% at 100% 0%, #ede9fe 0%, transparent 55%), - radial-gradient(120% 140% at 50% 120%, #d1fae5 0%, transparent 55%), - linear-gradient(135deg, #ffffff 0%, #f7faff 100%); - border-color: rgba(59, 130, 246, .14); -} -.page-hero__blob { - position: absolute; border-radius: 50%; filter: blur(46px); opacity: .55; - pointer-events: none; -} -.page-hero__blob--a { width: 220px; height: 220px; background: #c4b5fd; top: -50px; left: -40px; } -.page-hero__blob--b { width: 260px; height: 260px; background: #f9a8d4; top: 30%; right: -60px; } -.page-hero__blob--c { width: 180px; height: 180px; background: #fde68a; bottom: -50px; left: 40%; } -.page-hero--alt .page-hero__blob--a { background: #93c5fd; } -.page-hero--alt .page-hero__blob--b { background: #c4b5fd; } -.page-hero--alt .page-hero__blob--c { background: #6ee7b7; } -.page-hero__inner { position: relative; z-index: 1; } -.page-hero__badge { - display: inline-block; padding: 6px 14px; border-radius: 999px; - background: rgba(255, 255, 255, .7); backdrop-filter: blur(6px); - border: 1px solid rgba(168, 85, 247, .25); - color: var(--purple-700); font-size: .72rem; font-weight: 800; - letter-spacing: .08em; -} -.page-hero__title { - margin: 14px 0 8px; font-size: 2.4rem; font-weight: 900; - color: var(--ink); letter-spacing: -.01em; line-height: 1.15; -} -.page-hero__title-grad { - background: var(--grad-cta); -webkit-background-clip: text; - background-clip: text; color: transparent; - margin-left: 10px; -} -.page-hero--alt .page-hero__title-grad { background: var(--grad-sky); -webkit-background-clip: text; background-clip: text; } -.page-hero__subtitle { margin: 0 0 16px; color: var(--ink-muted); font-size: 1rem; } -.page-hero__stats { display: flex; flex-wrap: wrap; gap: 10px; } -.page-hero__stat { - display: inline-flex; align-items: baseline; gap: 6px; - padding: 8px 16px; border-radius: 999px; - background: rgba(255, 255, 255, .8); backdrop-filter: blur(8px); - border: 1px solid rgba(15, 23, 42, .06); - font-size: .85rem; color: var(--ink-muted); font-weight: 600; - box-shadow: 0 4px 12px rgba(124, 58, 237, .08); -} -.page-hero__stat b { - background: var(--grad-cta); -webkit-background-clip: text; - background-clip: text; color: transparent; - font-size: 1.05rem; font-weight: 900; -} - -.map-wrap--soft { border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin-bottom: 18px; } - -/* Toolbar (search + filter chips) */ -.toolbar { - display: flex; flex-wrap: wrap; gap: 12px; align-items: center; - padding: 14px 16px; margin: 18px 0; - background: linear-gradient(135deg, #ffffff 0%, #fbfaff 100%); - border: 1px solid var(--line); - border-radius: var(--radius); - box-shadow: var(--shadow-sm); -} -.toolbar__search { - flex: 1 1 280px; - display: inline-flex; align-items: center; gap: 8px; - padding: 8px 14px; border-radius: 12px; - background: #f4f6fc; border: 1px solid var(--line); - color: var(--muted); -} -.toolbar__search input { - flex: 1; border: 0; outline: 0; background: transparent; - font: inherit; color: var(--ink); -} -.toolbar__chips { display: flex; flex-wrap: wrap; gap: 8px; } - -.chip-soft { - display: inline-flex; align-items: center; gap: 6px; - padding: 6px 12px; border-radius: 999px; - font-size: .78rem; font-weight: 700; letter-spacing: .01em; - border: 1px solid transparent; -} -.chip-soft--sky { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); color: var(--sky-700); border-color: #cfe0fb; } -.chip-soft--purple { background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%); color: var(--purple-700); border-color: #ddd3fb; } -.chip-soft--pink { background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%); color: var(--pink-700); border-color: #f9cce3; } -.chip-soft--mint { background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); color: var(--mint-700); border-color: #b6ecd0; } -.chip-soft--amber { background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); color: var(--amber-700); border-color: #fde9a8; } - -/* Tile grid + tile component */ -.tile-grid { - display: grid; gap: 16px; margin-top: 4px; - grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); -} -.tile { - position: relative; - display: grid; grid-template-columns: 76px 1fr auto; - gap: 14px; align-items: center; - padding: 16px 18px; border-radius: var(--radius-lg); - border: 1px solid var(--line); - background: linear-gradient(135deg, #ffffff 0%, #fbfaff 100%); - box-shadow: var(--shadow-sm); - color: inherit; overflow: hidden; - transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; -} -.tile::before { - content: ""; position: absolute; inset: 0; - background: var(--grad-cta); opacity: 0; - transition: opacity .2s ease; - border-radius: inherit; pointer-events: none; - mix-blend-mode: multiply; -} -.tile:hover { - transform: translateY(-3px); - box-shadow: var(--shadow-md); - border-color: rgba(168, 85, 247, .28); -} -.tile--sky { background: linear-gradient(135deg, #ffffff 0%, #f0f6ff 100%); } -.tile--purple { background: linear-gradient(135deg, #ffffff 0%, #f6f1ff 100%); } -.tile--pink { background: linear-gradient(135deg, #ffffff 0%, #fff0f7 100%); } -.tile--mint { background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%); } -.tile--amber { background: linear-gradient(135deg, #ffffff 0%, #fff7e8 100%); } - -.tile__badge { - width: 64px; height: 64px; border-radius: 18px; - display: flex; align-items: center; justify-content: center; - color: #fff; font-size: 30px; font-weight: 900; - box-shadow: 0 10px 22px rgba(15, 23, 42, .18); - background: var(--grad-cta); -} -.tile__badge--num { font-size: 18px; letter-spacing: .02em; padding: 0 6px; text-align: center; } -.tile__badge--sky { background: var(--grad-sky); } -.tile__badge--purple { background: var(--grad-purple); } -.tile__badge--pink { background: var(--grad-pink); } -.tile__badge--mint { background: var(--grad-mint); } -.tile__badge--amber { background: var(--grad-amber); } - -.tile__body { min-width: 0; } -.tile__title { - margin: 0 0 4px; font-size: 1rem; font-weight: 800; color: var(--ink); - line-height: 1.3; - overflow: hidden; text-overflow: ellipsis; display: -webkit-box; - -webkit-line-clamp: 2; -webkit-box-orient: vertical; -} -.tile__meta { - margin: 0 0 8px; font-size: .82rem; color: var(--ink-muted); - overflow: hidden; text-overflow: ellipsis; white-space: nowrap; -} -.tile__chips { display: flex; flex-wrap: wrap; gap: 6px; } -.tile__arrow { - font-size: 1.4rem; color: var(--muted); font-weight: 700; - transition: transform .18s ease, color .18s ease; -} -.tile:hover .tile__arrow { color: var(--purple-700); transform: translateX(4px); } - -@media (max-width: 720px) { - .page-hero { padding: 32px 22px 28px; } - .page-hero__title { font-size: 1.8rem; } - .tile { grid-template-columns: 56px 1fr; padding: 14px; } - .tile__badge { width: 52px; height: 52px; font-size: 24px; border-radius: 14px; } - .tile__arrow { display: none; } -} - -/* ============ Route detail hero ============ */ -.route-hero { padding-top: 38px; } -.route-hero__top { - display: grid; - grid-template-columns: 96px 1fr; - gap: 20px; - align-items: center; - position: relative; z-index: 1; -} -.route-hero__badge { - width: 96px; height: 96px; - border-radius: 26px; - background: linear-gradient(135deg,#7c3aed,#ec4899 55%,#f59e0b); - color: #fff; - font-weight: 900; font-size: 1.9rem; - letter-spacing: .5px; - display: flex; align-items: center; justify-content: center; - box-shadow: 0 18px 38px rgba(124,58,237,.35), inset 0 1px 0 rgba(255,255,255,.4); - border: 3px solid rgba(255,255,255,.7); -} -.route-hero__title-wrap { min-width: 0; } -.route-hero__chips { - display: flex; flex-wrap: wrap; gap: 6px; - margin-bottom: 8px; -} -.route-hero__actions { - margin-top: 18px; - display: flex; flex-wrap: wrap; gap: 12px; - position: relative; z-index: 1; -} -.route-hero__cta { - display: inline-flex; align-items: center; gap: 8px; - padding: 12px 22px; - border-radius: 999px; - background: linear-gradient(135deg,#7c3aed,#ec4899); - color: #fff !important; font-weight: 800; font-size: .95rem; - text-decoration: none; - box-shadow: 0 12px 28px rgba(124,58,237,.32); - transition: transform .18s ease, box-shadow .18s ease; -} -.route-hero__cta:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(124,58,237,.42); } -.route-hero__back { - display: inline-flex; align-items: center; gap: 6px; - padding: 12px 18px; - border-radius: 999px; - background: rgba(255,255,255,.72); - border: 1px solid rgba(124,58,237,.18); - color: var(--purple-700) !important; font-weight: 700; font-size: .9rem; - text-decoration: none; - backdrop-filter: blur(6px); - transition: background .18s ease; -} -.route-hero__back:hover { background: #fff; } - -/* ============ Route map section ============ */ -.route-map-section { margin-top: 28px; } -.route-map-section__head { - display: flex; align-items: center; justify-content: space-between; - gap: 14px; flex-wrap: wrap; - margin-bottom: 10px; -} -.route-map-section__head .section-title { margin: 0; } -.route-map-section__legend { - display: inline-flex; flex-wrap: wrap; gap: 14px; - font-size: .85rem; color: var(--ink-muted); font-weight: 600; -} -.route-map-section__legend span { display: inline-flex; align-items: center; gap: 6px; } -.dot { - width: 12px; height: 12px; border-radius: 50%; - display: inline-block; - border: 2px solid #fff; - box-shadow: 0 0 0 1px rgba(0,0,0,.08); -} -.dot--start { background: linear-gradient(135deg,#34d399,#10b981); } -.dot--mid { background: linear-gradient(135deg,#a78bfa,#7c3aed); } -.dot--end { background: linear-gradient(135deg,#fb7185,#e11d48); } -.route-map { - height: 460px; - border: 1px solid rgba(124,58,237,.12); -} -.route-map-empty { - padding: 28px; - text-align: center; - border-radius: 20px; - background: linear-gradient(135deg,#fdf4ff,#eef2ff); - border: 1px dashed rgba(124,58,237,.25); -} - -/* ============ Stops timeline ============ */ -.stop-timeline { - list-style: none; - padding: 0; margin: 14px 0 0; - display: flex; flex-direction: column; gap: 10px; - position: relative; -} -.stop-node { - position: relative; - display: grid; - grid-template-columns: 56px 1fr auto; - align-items: center; - gap: 14px; - padding: 14px 16px; - border-radius: 18px; - background: linear-gradient(135deg,#ffffff 0%,#fbfaff 100%); - border: 1px solid rgba(124,58,237,.10); - box-shadow: 0 6px 16px rgba(31,28,68,.05); - transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; -} -.stop-node:hover { - transform: translateY(-1px); - border-color: rgba(124,58,237,.25); - box-shadow: 0 10px 24px rgba(124,58,237,.12); -} -.stop-node__line { - position: absolute; - left: 43px; top: 100%; - width: 2px; height: 10px; - background: linear-gradient(180deg, rgba(124,58,237,.35), rgba(124,58,237,0)); -} -.stop-node:last-child .stop-node__line { display: none; } -.stop-node__bullet { - width: 44px; height: 44px; - border-radius: 14px; - background: linear-gradient(135deg,#a78bfa,#7c3aed); - color: #fff; - font-weight: 800; font-size: 1.05rem; - display: flex; align-items: center; justify-content: center; - border: 3px solid #fff; - box-shadow: 0 6px 14px rgba(124,58,237,.30); -} -.stop-node__bullet.is-start { background: linear-gradient(135deg,#34d399,#10b981); box-shadow: 0 6px 14px rgba(16,185,129,.30); } -.stop-node__bullet.is-end { background: linear-gradient(135deg,#fb7185,#e11d48); box-shadow: 0 6px 14px rgba(225,29,72,.28); } -.stop-node--sky .stop-node__bullet:not(.is-start):not(.is-end) { background: linear-gradient(135deg,#7dd3fc,#0284c7); } -.stop-node--pink .stop-node__bullet:not(.is-start):not(.is-end) { background: linear-gradient(135deg,#fda4af,#db2777); } -.stop-node--mint .stop-node__bullet:not(.is-start):not(.is-end) { background: linear-gradient(135deg,#6ee7b7,#059669); } -.stop-node--amber .stop-node__bullet:not(.is-start):not(.is-end) { background: linear-gradient(135deg,#fcd34d,#d97706); } -.stop-node__body { min-width: 0; } -.stop-node__head { - display: flex; flex-wrap: wrap; align-items: center; gap: 8px; - margin-bottom: 4px; -} -.stop-node__title { - font-weight: 800; font-size: 1.02rem; - color: var(--ink, #1f1c44); - text-decoration: none; -} -.stop-node__title:hover { color: var(--purple-700); } -.stop-node__meta { - display: flex; flex-wrap: wrap; gap: 8px; - align-items: center; - font-size: .85rem; color: var(--ink-muted); -} -.stop-node__loc { font-size: .82rem; } -.stop-node__warn { - font-size: .75rem; font-weight: 700; - padding: 2px 8px; border-radius: 999px; - background: #fff7ed; color: #c2410c; - border: 1px solid #fed7aa; -} -.stop-node__arrow { - font-size: 1.4rem; color: var(--muted); - font-weight: 700; text-decoration: none; - transition: transform .18s ease, color .18s ease; -} -.stop-node:hover .stop-node__arrow { color: var(--purple-700); transform: translateX(4px); } - -@media (max-width: 720px) { - .route-hero__top { grid-template-columns: 76px 1fr; gap: 14px; } - .route-hero__badge { width: 76px; height: 76px; font-size: 1.5rem; border-radius: 22px; } - .route-map { height: 360px; } - .stop-node { grid-template-columns: 48px 1fr; padding: 12px 14px; } - .stop-node__bullet { width: 40px; height: 40px; font-size: .95rem; border-radius: 12px; } - .stop-node__line { left: 37px; } - .stop-node__arrow { display: none; } -} - 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..5f84bb8 100644 --- a/frontend/src/app/layout.tsx +++ b/frontend/src/app/layout.tsx @@ -1,27 +1,51 @@ -import "./globals.css"; import type { Metadata } from "next"; -import { Header } from "@/components/Header"; -import { Footer } from "@/components/Footer"; +import IconSprite from "@/components/IconSprite"; +import SiteBoot from "@/components/SiteBoot"; +import SiteFooter from "@/components/SiteFooter"; +import SiteHeader from "@/components/SiteHeader"; + +// ลำดับ CSS ต้องตรงกับ mock: shared → map → shell → page → responsive +import "@/styles/_shared.css"; +import "@/styles/map.css"; +import "@/styles/shell.css"; +import "@/styles/responsive.css"; +// CSS ของ partial ต้องมาหลัง responsive.css — ตรงกับลำดับใน mock +// (router เดิม inject