This commit is contained in:
Bkk1234 committed 2026-09-23 00:53:04 +07:00
1 parent bea0fff388
commit 4ac51969e2
37 files changed
+1270 -166

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
# AGENTS.md — คำสั่งสำหรับ AI coding agent # AGENTS.md — คำสั่งสำหรับ AI coding agent
โปรเจกต์: **web-at-transit-mock** — mockup/ดีไซน์ HTML ต้นแบบของเว็บข้อมูลการเดินรถ โปรเจกต์: **web-at-transit-mock** — mockup/ดีไซน์ HTML ต้นแบบของเว็บข้อมูลการเดินรถ
สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง (AT Transit) สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง (Atroute)
> หมายเหตุ: repo นี้เป็น **static HTML mockup** (ยังไม่มี backend / framework) > หมายเหตุ: repo นี้เป็น **static HTML mockup** (ยังไม่มี backend / framework)
> ส่วน implementation จริง (Next.js) อยู่ที่ `web-at-transit` — เวลาทำงานกับ repo นี้ > ส่วน implementation จริง (Next.js) อยู่ที่ `web-at-transit` — เวลาทำงานกับ repo นี้
+1 -1
View File
@@ -1,4 +1,4 @@
# DESIGN.md — เอกลักษณ์งานออกแบบ AT Transit # DESIGN.md — เอกลักษณ์งานออกแบบ Atroute
> ไฟล์นี้คือ "รัฐธรรมนูญ" ของงานออกแบบ — **AI agent ต้องอ่านก่อนแก้ UI ทุกครั้ง** > ไฟล์นี้คือ "รัฐธรรมนูญ" ของงานออกแบบ — **AI agent ต้องอ่านก่อนแก้ UI ทุกครั้ง**
> และต้องปฏิบัติตามกฎ "ห้ามทำ" อย่างเคร่งครัด ไม่งั้นงานจะกลับไปเป็นเว็บ AI ทั่วไป > และต้องปฏิบัติตามกฎ "ห้ามทำ" อย่างเคร่งครัด ไม่งั้นงานจะกลับไปเป็นเว็บ AI ทั่วไป
+2 -2
View File
@@ -1,5 +1,5 @@
# ============================================================ # ============================================================
# AT Transit mockup — Makefile # Atroute mockup — Makefile
# เรียกดูคำสั่งทั้งหมด: make help # เรียกดูคำสั่งทั้งหมด: make help
# ============================================================ # ============================================================
@@ -8,7 +8,7 @@ PORT ?= 8090
.PHONY: help setup pack serve .PHONY: help setup pack serve
help: ## แสดงรายการคำสั่งทั้งหมด help: ## แสดงรายการคำสั่งทั้งหมด
@echo "AT Transit mockup — คำสั่งที่มี:" @echo "Atroute mockup — คำสั่งที่มี:"
@echo " make setup แตก resource/images.zip → .image/ (ครั้งแรกหลัง clone)" @echo " make setup แตก resource/images.zip → .image/ (ครั้งแรกหลัง clone)"
@echo " make pack re-zip .image/ → resource/images.zip (หลังแก้รูป)" @echo " make pack re-zip .image/ → resource/images.zip (หลังแก้รูป)"
@echo " make serve รัน static server ที่ http://localhost:$(PORT)/ui/index.html" @echo " make serve รัน static server ที่ http://localhost:$(PORT)/ui/index.html"
+1 -1
View File
@@ -1,6 +1,6 @@
# web-at-transit-mock # web-at-transit-mock
Static HTML mockup / ดีไซน์ต้นแบบเว็บข้อมูลการเดินรถ — สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง (AT Transit) Static HTML mockup / ดีไซน์ต้นแบบเว็บข้อมูลการเดินรถ — สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง (Atroute)
> repo นี้เป็น **static HTML + vanilla JS** (ไม่มี backend / framework / build step) > repo นี้เป็น **static HTML + vanilla JS** (ไม่มี backend / framework / build step)
> ส่วน implementation จริง (Next.js) อยู่ที่ `web-at-transit` > ส่วน implementation จริง (Next.js) อยู่ที่ `web-at-transit`
+1 -1
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# ============================================================ # ============================================================
# AT Transit mockup — จัดการไฟล์รูปภาพ (.image/) # Atroute mockup — จัดการไฟล์รูปภาพ (.image/)
# ./setup.sh → แตก resource/images.zip → .image/ # ./setup.sh → แตก resource/images.zip → .image/
# ./setup.sh pack → re-zip .image/ → resource/images.zip # ./setup.sh pack → re-zip .image/ → resource/images.zip
# ============================================================ # ============================================================
+1 -1
View File
@@ -1,5 +1,5 @@
/* ========================================================= /* =========================================================
AT Transit shared polish — applied to all mockup pages Atroute shared polish — applied to all mockup pages
Loaded AFTER main-theme.css, BEFORE per-page <style>. Loaded AFTER main-theme.css, BEFORE per-page <style>.
========================================================= */ ========================================================= */
+2 -2
View File
@@ -2,13 +2,13 @@
<html lang="th"> <html lang="th">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>รายละเอียดสายรถ | AT Transit</title> <title>รายละเอียดสายรถ | Atroute</title>
<script> <script>
var m = /[?&]route=([^&]+)/.exec(location.search); var m = /[?&]route=([^&]+)/.exec(location.search);
location.replace(m ? './index.html#/routes/' + encodeURIComponent(m[1]) : './index.html#/routes'); location.replace(m ? './index.html#/routes/' + encodeURIComponent(m[1]) : './index.html#/routes');
</script> </script>
</head> </head>
<body> <body>
<noscript><a href="./index.html">เปิด AT Transit</a></noscript> <noscript><a href="./index.html">เปิด Atroute</a></noscript>
</body> </body>
</html> </html>
+2 -2
View File
@@ -2,12 +2,12 @@
<html lang="th"> <html lang="th">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>ตารางขยาย | AT Transit</title> <title>ตารางขยาย | Atroute</title>
<script> <script>
location.replace('./index.html#/routes/expanded'); location.replace('./index.html#/routes/expanded');
</script> </script>
</head> </head>
<body> <body>
<noscript><a href="./index.html">เปิด AT Transit</a></noscript> <noscript><a href="./index.html">เปิด Atroute</a></noscript>
</body> </body>
</html> </html>
+2 -2
View File
@@ -2,12 +2,12 @@
<html lang="th"> <html lang="th">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>ป้ายหยุดรถ | AT Transit</title> <title>ป้ายหยุดรถ | Atroute</title>
<script> <script>
location.replace('./index.html#/stops'); location.replace('./index.html#/stops');
</script> </script>
</head> </head>
<body> <body>
<noscript><a href="./index.html">เปิด AT Transit</a></noscript> <noscript><a href="./index.html">เปิด Atroute</a></noscript>
</body> </body>
</html> </html>
+2 -2
View File
@@ -2,12 +2,12 @@
<html lang="th"> <html lang="th">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>เครดิต | AT Transit</title> <title>เครดิต | Atroute</title>
<script> <script>
location.replace('./index.html#/credits'); location.replace('./index.html#/credits');
</script> </script>
</head> </head>
<body> <body>
<noscript><a href="./index.html">เปิด AT Transit</a></noscript> <noscript><a href="./index.html">เปิด Atroute</a></noscript>
</body> </body>
</html> </html>
+42 -4
View File
@@ -1,5 +1,5 @@
/* ============================================================ /* ============================================================
AT Transit — ระบบหลายภาษา (i18n) Atroute — ระบบหลายภาษา (i18n)
------------------------------------------------------------ ------------------------------------------------------------
วิธีใช้: วิธีใช้:
1. ใส่ data-i18n="key" บน element ที่เป็นข้อความ 1. ใส่ data-i18n="key" บน element ที่เป็นข้อความ
@@ -26,6 +26,23 @@
'nav.routes': 'รายละเอียดสายรถ', 'nav.routes': 'รายละเอียดสายรถ',
'nav.expanded': 'ตารางขยาย', 'nav.expanded': 'ตารางขยาย',
'nav.credits': 'เครดิต', 'nav.credits': 'เครดิต',
'nav.about': 'เกี่ยวกับเรา',
'nav.blog': 'บ่นไปเรื่อย',
'about.title': 'เกี่ยวกับเรา',
'about.brand': 'เมื่อไหร่รถจะมา',
'about.lead': 'เรื่องราวและที่มาของเว็บนี้ — อ่านเรียงตามบล็อกด้านล่างได้เลย',
'blog.title': 'บ่นไปเรื่อย',
'blog.subtitle': 'ข่าวสาร & ความรู้การเดินทาง',
'blog.lead': 'รวมข่าวเส้นทาง อัปเดตตารางรถ และเกร็ดความรู้ — สลับมุมมองตาราง/รายการได้ตามถนัด',
'blog.viewGrid': 'ตาราง',
'blog.viewList': 'รายการ',
'blog.count': 'บ่นไปเรื่อยทั้งหมด',
'blog.items': 'เรื่อง',
'blog.minRead': 'นาที',
'blog.readMore': 'อ่านต่อ',
'blog.backList': 'กลับไปรายการบ่นไปเรื่อย',
'blog.empty': 'ยังไม่มีเรื่องบ่น — เพิ่มไฟล์ใน ui/partials/blog-data/ ได้เลย',
'blog.notFound': 'ไม่พบเรื่องบ่นนี้',
'cta.check': 'เช็กเวลาเดินรถ', 'cta.check': 'เช็กเวลาเดินรถ',
'footer.menu': 'เมนู', 'footer.menu': 'เมนู',
'footer.popular': 'สายที่ค้นหาบ่อยที่สุด', 'footer.popular': 'สายที่ค้นหาบ่อยที่สุด',
@@ -56,7 +73,7 @@
'card.noSchedule': 'ยังไม่มีตาราง', 'card.noSchedule': 'ยังไม่มีตาราง',
// ป้ายหยุดรถ // ป้ายหยุดรถ
'stops.title': 'ค้นหาป้ายหยุดรถแบบรวดเร็วและอ่านง่าย', 'stops.title': 'ค้นหาป้ายหยุดรถแบบรวดเร็ว',
'stops.subtitle': 'รวมสถานีขนส่งหลัก จุดจอดท้องถิ่น สถานีรถตู้ และจุดเอกชน — ใช้งานได้ทั้งบนมือถือและเดสก์ท็อป', 'stops.subtitle': 'รวมสถานีขนส่งหลัก จุดจอดท้องถิ่น สถานีรถตู้ และจุดเอกชน — ใช้งานได้ทั้งบนมือถือและเดสก์ท็อป',
'stops.kpi.total': 'จำนวนจุดทั้งหมด', 'stops.kpi.total': 'จำนวนจุดทั้งหมด',
'stops.kpi.coverage': 'ครอบคลุม', 'stops.kpi.coverage': 'ครอบคลุม',
@@ -68,7 +85,7 @@
'stops.allTypes': 'ทุกประเภท', 'stops.allTypes': 'ทุกประเภท',
'stops.mapTitle': 'แผนที่ย่อของเครือข่ายป้าย', 'stops.mapTitle': 'แผนที่ย่อของเครือข่ายป้าย',
'stops.onMap': 'บนแผนที่', 'stops.onMap': 'บนแผนที่',
'type.terminal': 'สถานีขนส่งหลัก', 'type.terminal': 'สถานีขนส่งผู้โดยสาร',
'type.station': 'ป้ายหลัก', 'type.station': 'ป้ายหลัก',
'type.pickup': 'จุดรับส่ง', 'type.pickup': 'จุดรับส่ง',
'type.market': 'ตลาด/ชุมชน', 'type.market': 'ตลาด/ชุมชน',
@@ -116,6 +133,8 @@
'common.noWebsite': 'ยังไม่ระบุเว็บไซต์', 'common.noWebsite': 'ยังไม่ระบุเว็บไซต์',
'type.van': 'สถานีรถตู้', 'type.van': 'สถานีรถตู้',
'type.local': 'จุดจอดท้องถิ่น', 'type.local': 'จุดจอดท้องถิ่น',
'type.busstop': 'ศาลารอรถ หรือป้ายหยุดรถ',
'type.startlocalpoint': 'ต้นทางรถสายท้องถิ่น',
'type.other': 'จุดขึ้นรถประจำทางอื่นๆ', 'type.other': 'จุดขึ้นรถประจำทางอื่นๆ',
'type.marketOpt': 'ตลาด/จุดเอกชน', 'type.marketOpt': 'ตลาด/จุดเอกชน',
@@ -153,6 +172,23 @@
'nav.routes': 'Route Details', 'nav.routes': 'Route Details',
'nav.expanded': 'Expanded', 'nav.expanded': 'Expanded',
'nav.credits': 'Credits', 'nav.credits': 'Credits',
'nav.about': 'About',
'nav.blog': 'Blog',
'about.title': 'About Us',
'about.brand': 'When will the bus come?',
'about.lead': 'Our story — read through the blocks below.',
'blog.title': 'Blog',
'blog.subtitle': 'News & travel know-how',
'blog.lead': 'Route news, timetable updates and useful tips — switch between grid and list view.',
'blog.viewGrid': 'Grid',
'blog.viewList': 'List',
'blog.count': 'All posts',
'blog.items': 'posts',
'blog.minRead': 'min read',
'blog.readMore': 'Read more',
'blog.backList': 'Back to all posts',
'blog.empty': 'No posts yet — add files under ui/partials/blog-data/',
'blog.notFound': 'Post not found',
'cta.check': 'Check Schedules', 'cta.check': 'Check Schedules',
'footer.menu': 'Menu', 'footer.menu': 'Menu',
'footer.popular': 'Most Searched Routes', 'footer.popular': 'Most Searched Routes',
@@ -193,7 +229,7 @@
'stops.allTypes': 'All types', 'stops.allTypes': 'All types',
'stops.mapTitle': 'Stop network map', 'stops.mapTitle': 'Stop network map',
'stops.onMap': 'On map', 'stops.onMap': 'On map',
'type.terminal': 'Main terminal', 'type.terminal': 'Passenger terminal',
'type.station': 'Major stop', 'type.station': 'Major stop',
'type.pickup': 'Pickup point', 'type.pickup': 'Pickup point',
'type.market': 'Market / community', 'type.market': 'Market / community',
@@ -238,6 +274,8 @@
'common.noWebsite': 'No website listed', 'common.noWebsite': 'No website listed',
'type.van': 'Van station', 'type.van': 'Van station',
'type.local': 'Local stop', 'type.local': 'Local stop',
'type.busstop': 'Bus shelter / stop',
'type.startlocalpoint': 'Local route origin',
'type.other': 'Other boarding points', 'type.other': 'Other boarding points',
'type.marketOpt': 'Market / private stop', 'type.marketOpt': 'Market / private stop',
+24 -16
View File
@@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"> <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title>หน้าแรก | AT Transit (mockup)</title> <title>หน้าแรก | Atroute (mockup)</title>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700;800&family=Prompt:wght@400;500;600;700&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700;800&family=Prompt:wght@400;500;600;700&display=swap" rel="stylesheet">
<link href="../../frontend-web-transit/web-transit/css/main-theme.css" rel="stylesheet"> <link href="../../frontend-web-transit/web-transit/css/main-theme.css" rel="stylesheet">
<link href="./_shared.css" rel="stylesheet"> <link href="./_shared.css" rel="stylesheet">
@@ -53,10 +53,12 @@
/* Topbar */ /* Topbar */
.mu-topbar { background: #ffffff; border-bottom: 1px solid #e9eef7; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 8px rgba(20,40,90,.04); } .mu-topbar { background: #ffffff; border-bottom: 1px solid #e9eef7; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 8px rgba(20,40,90,.04); }
.mu-topbar-inner { display: flex; align-items: center; gap: 18px; padding: 14px 28px; } .mu-topbar-inner { display: flex; align-items: center; gap: 18px; padding: 14px 28px; }
.mu-brand { display: flex; align-items: center; gap: 12px; } .mu-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.mu-logo-img { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg,#8b5cf6,#ec4899); padding: 4px; } .mu-logo-img { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg,#8b5cf6,#ec4899); padding: 4px; transition: transform .15s ease; }
.mu-brand-title { margin: 0; font-weight: 800; font-size: 1.05rem; color: #1f2a44; } .mu-brand:hover .mu-logo-img { transform: scale(1.06); }
.mu-brand-subtitle { margin: 0; font-size: .72rem; color: #6f7b95; } .mu-brand-title { display: block; margin: 0; font-weight: 800; font-size: 1.05rem; color: #1f2a44; transition: color .15s ease; }
.mu-brand:hover .mu-brand-title { color: #7a4cc0; }
.mu-brand-subtitle { display: block; margin: 0; font-size: .72rem; color: #6f7b95; }
.mu-nav { margin-left: auto; display: flex; gap: 28px; } .mu-nav { margin-left: auto; display: flex; gap: 28px; }
.mu-nav a { color: #4a5876; text-decoration: none; font-size: .92rem; font-weight: 600; padding: 6px 4px; border-bottom: 2px solid transparent; } .mu-nav a { color: #4a5876; text-decoration: none; font-size: .92rem; font-weight: 600; padding: 6px 4px; border-bottom: 2px solid transparent; }
.mu-nav a.active { color: #d6336c; border-bottom-color: #ec4899; } .mu-nav a.active { color: #d6336c; border-bottom-color: #ec4899; }
@@ -363,17 +365,19 @@
<header class="mu-topbar"> <header class="mu-topbar">
<div class="mu-container mu-topbar-inner"> <div class="mu-container mu-topbar-inner">
<div class="mu-brand"> <a class="mu-brand" href="#/" aria-label="Atroute — หน้าแรก">
<img class="mu-logo-img" src="../.image/icons/minibus-512x512.png" alt="AT Transit logo" width="44" height="44" decoding="async"> <img class="mu-logo-img" src="../.image/icons/minibus-512x512.png" alt="Atroute logo" width="44" height="44" decoding="async">
<div> <span>
<p class="mu-brand-title">AT Transit</p> <span class="mu-brand-title">Atroute</span>
<p class="mu-brand-subtitle" data-i18n="brand.subtitle">สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</p> <span class="mu-brand-subtitle" data-i18n="brand.subtitle">สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</span>
</div> </span>
</div> </a>
<nav class="mu-nav" aria-label="เมนูหลัก"> <nav class="mu-nav" aria-label="เมนูหลัก">
<a class="active" href="#/" data-i18n="nav.home">หน้าแรก</a> <a class="active" href="#/" data-i18n="nav.home">หน้าแรก</a>
<a href="#/stops" data-i18n="nav.stops">ป้ายหยุดรถ</a> <a href="#/stops" data-i18n="nav.stops">ป้ายหยุดรถ</a>
<a href="#/routes" data-i18n="nav.routes">รายละเอียดสายรถ</a> <a href="#/routes" data-i18n="nav.routes">รายละเอียดสายรถ</a>
<a href="#/about" data-i18n="nav.about">เกี่ยวกับเรา</a>
<a href="#/blog" data-i18n="nav.blog">บ่นไปเรื่อย</a>
<a href="#/credits" data-i18n="nav.credits">เครดิต</a> <a href="#/credits" data-i18n="nav.credits">เครดิต</a>
</nav> </nav>
<details class="mu-menu" id="topnav"> <details class="mu-menu" id="topnav">
@@ -385,6 +389,8 @@
<a href="#/stops" data-i18n="nav.stops" role="menuitem">ป้ายหยุดรถ</a> <a href="#/stops" data-i18n="nav.stops" role="menuitem">ป้ายหยุดรถ</a>
<a href="#/routes" data-i18n="nav.routes" role="menuitem">รายละเอียดสายรถ</a> <a href="#/routes" data-i18n="nav.routes" role="menuitem">รายละเอียดสายรถ</a>
<a href="#/check" data-i18n="cta.check" role="menuitem">เช็กเวลาเดินรถ</a> <a href="#/check" data-i18n="cta.check" role="menuitem">เช็กเวลาเดินรถ</a>
<a href="#/about" data-i18n="nav.about" role="menuitem">เกี่ยวกับเรา</a>
<a href="#/blog" data-i18n="nav.blog" role="menuitem">บ่นไปเรื่อย</a>
<a href="#/credits" data-i18n="nav.credits" role="menuitem">เครดิต</a> <a href="#/credits" data-i18n="nav.credits" role="menuitem">เครดิต</a>
</div> </div>
</details> </details>
@@ -403,9 +409,9 @@
<div class="mu-footer-grid"> <div class="mu-footer-grid">
<div class="mu-footer-brand"> <div class="mu-footer-brand">
<div class="mu-footer-brand-row"> <div class="mu-footer-brand-row">
<img src="../.image/icons/minibus-512x512.png" alt="AT Transit"> <img src="../.image/icons/minibus-512x512.png" alt="Atroute">
<div> <div>
<strong>AT Transit</strong> <strong>Atroute</strong>
<span data-i18n="brand.subtitle">สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</span> <span data-i18n="brand.subtitle">สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</span>
</div> </div>
</div> </div>
@@ -418,6 +424,8 @@
<li><a href="#/stops" data-i18n="nav.stops">ค้นหาป้ายหยุดรถ</a></li> <li><a href="#/stops" data-i18n="nav.stops">ค้นหาป้ายหยุดรถ</a></li>
<li><a href="#/routes" data-i18n="nav.routes">รายละเอียดสายรถ</a></li> <li><a href="#/routes" data-i18n="nav.routes">รายละเอียดสายรถ</a></li>
<li><a href="#/routes/expanded" data-i18n="nav.expanded">ตารางขยาย</a></li> <li><a href="#/routes/expanded" data-i18n="nav.expanded">ตารางขยาย</a></li>
<li><a href="#/about" data-i18n="nav.about">เกี่ยวกับเรา</a></li>
<li><a href="#/blog" data-i18n="nav.blog">บ่นไปเรื่อย</a></li>
<li><a href="#/credits" data-i18n="nav.credits">เครดิต</a></li></ul> <li><a href="#/credits" data-i18n="nav.credits">เครดิต</a></li></ul>
</div> </div>
<div class="mu-footer-col"> <div class="mu-footer-col">
@@ -431,12 +439,12 @@
</div> </div>
<div class="mu-footer-col mu-footer-contact"> <div class="mu-footer-col mu-footer-contact">
<h4 data-i18n="footer.contact">ติดต่อ</h4> <h4 data-i18n="footer.contact">ติดต่อ</h4>
<div class="row"><a href="mailto:attransit@hobbygirds.com"><svg class="ic" aria-hidden="true"><use href="#ic-mail"/></svg> [email protected]</a></div> <div class="row"><a href="mailto:atroute@hobbygirds.com"><svg class="ic" aria-hidden="true"><use href="#ic-mail"/></svg> [email protected]</a></div>
</div> </div>
</div> </div>
<div class="mu-footer-bottom"> <div class="mu-footer-bottom">
<p>© 2026 AT Transit</p> <p>© 2026 Atroute</p>
<span class="mu-visitor" title="จำนวนผู้เข้าชมเว็บไซต์"> <span class="mu-visitor" title="จำนวนผู้เข้าชมเว็บไซต์">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/></svg> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/></svg>
<span>ผู้เข้าชม</span> <span>ผู้เข้าชม</span>
+2 -2
View File
@@ -1,7 +1,7 @@
{ {
"id": "./index.html", "id": "./index.html",
"name": "AT Transit — สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง", "name": "Atroute — สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง",
"short_name": "AT Transit", "short_name": "Atroute",
"description": "ค้นหาเส้นทาง ตารางเดินรถ และจุดจอดในจังหวัดอ่างทองและจังหวัดใกล้เคียง", "description": "ค้นหาเส้นทาง ตารางเดินรถ และจุดจอดในจังหวัดอ่างทองและจังหวัดใกล้เคียง",
"lang": "th", "lang": "th",
"dir": "ltr", "dir": "ltr",
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#7a4cc0"> <meta name="theme-color" content="#7a4cc0">
<title>ออฟไลน์ | AT Transit</title> <title>ออฟไลน์ | Atroute</title>
<style> <style>
* { box-sizing: border-box; margin: 0; padding: 0; } * { box-sizing: border-box; margin: 0; padding: 0; }
body { body {
+72
View File
@@ -0,0 +1,72 @@
<style>
/* ===== หน้าเกี่ยวกับเรา — เนื้อหาจาก partials/about-data/ (textN.json + picN) ===== */
.mu-hero-lead {
margin: 14px auto 0;
max-width: 640px;
color: #5b3b71;
font-size: .95rem;
}
.mu-about-wrap { padding: 30px 0 52px; }
#about-blocks { display: flex; flex-direction: column; gap: 26px; }
.mu-about-block {
display: grid;
grid-template-columns: 1fr;
gap: 16px;
align-items: center;
background: #fff;
border: 1px solid #ebe8f4;
border-radius: 18px;
padding: 16px;
box-shadow: 0 10px 26px rgba(63, 43, 94, .07);
}
.mu-about-block .mu-about-media { order: 2; }
.mu-about-block .mu-about-media img {
width: 100%;
height: auto;
max-height: 420px;
object-fit: cover;
border-radius: 14px;
display: block;
box-shadow: 0 10px 24px rgba(63, 43, 94, .14);
}
.mu-about-block h2 { margin: 0 0 10px; font-size: 1.2rem; color: #1f2a44; font-weight: 800; line-height: 1.35; }
.mu-about-block p { margin: 0 0 10px; color: #4a5568; font-size: .95rem; line-height: 1.8; }
.mu-about-block p:last-child { margin-bottom: 0; }
.mu-about-skeleton { color: #6f7b95; font-size: .9rem; text-align: center; padding: 18px 0; }
.mu-about-skel-card { height: 180px; border-radius: 18px; background: linear-gradient(90deg, #f4f2fa 25%, #ece8f6 37%, #f4f2fa 63%); background-size: 400% 100%; animation: muSkel 1.4s ease infinite; }
@keyframes muSkel { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
/* แท็บเล็ต/เดสก์ท็อป: 2 คอลัมน์ + สลับข้าง (คี่ = ข้อความซ้าย, คู่ = รูปซ้าย) */
@media (min-width: 768px) {
.mu-about-block { grid-template-columns: 1.05fr .95fr; gap: 28px; padding: 24px 26px; }
.mu-about-block .mu-about-media { order: 0; }
.mu-about-block:nth-child(even) .mu-about-media { order: -1; }
}
</style>
<!-- ============ HERO (ภาษาเดียวกับหน้าแรก) ============ -->
<section class="mu-hero">
<img class="mu-hero-map" src="../.image/network/overview-map.png" alt="" aria-hidden="true" decoding="async">
<div class="mu-blob one"></div>
<div class="mu-blob two"></div>
<div class="mu-blob three"></div>
<div class="mu-container mu-hero-content">
<span class="mu-badge"><svg class="ic" aria-hidden="true"><use href="#ic-map-pin"/></svg> <span data-i18n="nav.about">เกี่ยวกับเรา</span></span>
<h1><span data-i18n="about.title">เกี่ยวกับเรา</span><br><span class="mu-gradient-text" data-i18n="about.brand">เมื่อไหร่รถจะมา</span></h1>
<p class="mu-hero-lead" data-i18n="about.lead">เรื่องราวและที่มาของเว็บนี้ — อ่านเรียงตามบล็อกด้านล่างได้เลย</p>
</div>
</section>
<!-- ============ เนื้อหา (โหลดจาก about-data: text1.json + pic1, text2.json + pic2 ...) ============ -->
<section class="mu-about-wrap">
<div class="mu-container">
<div id="about-blocks" aria-live="polite">
<div class="mu-about-skeleton"><div class="mu-about-skel-card"></div></div>
</div>
</div>
</section>
<script src="./partials/about.init.js"></script>
+105
View File
@@ -0,0 +1,105 @@
/* ============================================================
หน้าเกี่ยวกับเรา — loader
------------------------------------------------------------
อ่านเนื้อหาจาก partials/about-data/ เรียงสลับกันไปเรื่อย ๆ:
text1.json + pic1.<ext> , text2.json + pic2.<ext> , ...
- textN.json: { "th": { "title": "...", "body": ["...", "..."] },
"en": { "title": "...", "body": [...] } }
(ไม่เขียน en → โหมด EN ใช้ th แทน)
- picN รองรับ .jpg .jpeg .png .webp
- หยุดเองเมื่อหา textN.json ถัดไปไม่เจอ
============================================================ */
(function () {
'use strict';
var DATA_DIR = './partials/about-data/';
var IMG_EXTS = ['jpg', 'jpeg', 'png', 'webp'];
var MAX_BLOCKS = 30;
function lang() {
return (window.I18N && I18N.getLang()) || 'th';
}
function pick(data, l) {
if (!data) return null;
if (l !== 'th' && data[l]) return data[l];
return data.th || data[l] || data[Object.keys(data)[0]] || data;
}
function fetchJSON(n) {
return fetch(DATA_DIR + 'text' + n + '.json', { cache: 'no-store' })
.then(function (r) { return r.ok ? r.json() : null; })
.catch(function () { return null; });
}
function findImage(n) {
var i = 0;
function tryNext() {
if (i >= IMG_EXTS.length) return Promise.resolve(null);
var url = DATA_DIR + 'pic' + n + '.' + IMG_EXTS[i++];
return fetch(url, { method: 'HEAD', cache: 'no-store' })
.then(function (r) { return r.ok ? url : tryNext(); })
.catch(tryNext);
}
return tryNext();
}
function renderBlock(host, data, imgUrl) {
var c = pick(data, lang());
if (!c) return;
var art = document.createElement('article');
art.className = 'mu-about-block';
var text = document.createElement('div');
text.className = 'mu-about-text';
var h2 = document.createElement('h2');
h2.textContent = c.title || '';
text.appendChild(h2);
(c.body || c.paragraphs || []).forEach(function (p) {
var el = document.createElement('p');
el.textContent = p;
text.appendChild(el);
});
art.appendChild(text);
if (imgUrl) {
var media = document.createElement('div');
media.className = 'mu-about-media';
var img = document.createElement('img');
img.src = imgUrl;
img.alt = c.imgAlt || c.title || '';
img.loading = 'lazy';
img.decoding = 'async';
media.appendChild(img);
art.appendChild(media);
}
host.appendChild(art);
}
function init() {
var host = document.getElementById('about-blocks');
if (!host) return;
var cleared = false;
var n = 1;
function next() {
if (n > MAX_BLOCKS) return;
var current = n++;
fetchJSON(current).then(function (data) {
if (!data) return; // ไม่มี textN ถัดไป → จบ
if (!cleared) { host.innerHTML = ''; cleared = true; }
findImage(current).then(function (imgUrl) {
renderBlock(host, data, imgUrl);
next();
});
});
}
next();
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', init);
} else {
init();
}
})();
+37
View File
@@ -0,0 +1,37 @@
# 📁 blog-data — เนื้อหาหน้า "บทความ" (#/blog)
ระบบเดียวกับ `about-data/` — **แต่ละบทความ = textN.json + picN.\*** จับคู่กันตามเลข
(`text1.json`+`pic1.jpg`, `text2.json`+`pic2.jpg`, ...) ระบบไล่เลขไปเรื่อย ๆ จนหาไม่เจอแล้วหยุดเอง
## รูปแบบ textN.json
```json
{
"date": "2026-09-14",
"th": { "title": "หัวข้อบทความ", "tag": "ข่าว", "body": ["ย่อหน้าที่ 1", "ย่อหน้าที่ 2"] },
"en": { "title": "Post title", "tag": "News", "body": ["Paragraph 1", "Paragraph 2"] }
}
```
| ฟิลด์ | จำเป็น? | หมายเหตุ |
|---|---|---|
| `th.title` / `th.body` | ✅ | เนื้อหาไทย (โหมด EN ถ้าไม่เขียน en จะใช้ th แทน) |
| `th.tag` | – | ป้ายมุมการ์ด (เช่น ข่าว / วิธีใช้ / อัปเดต) |
| `en.*` | – | คำแปลอังกฤษ (ไม่ใส่ = ใช้ th) |
| `date` | – | ISO `YYYY-MM-DD` แสดงบนการ์ด (ไม่ใส่ก็ได้) |
## รูป
- วางชื่อ `picN.jpg` (หรือ `.jpeg` / `.png` / `.webp`) — แนะนำ 1200×675 (16:9)
- ไม่มีรูปก็ได้ — การ์ดจะใช้พื้น gradient แทน
## มุมมอง
- หน้า `#/blog` มีปุ่มสลับ **ตาราง (grid)** / **รายการ (list)** — จำค่าที่เลือกไว้
- คลิกการ์ด → เปิดอ่านบทความเต็มที่ `#/blog/N` (มีปุ่มย้อนกลับไปรายการ)
## เพิ่มบทความใหม่
สร้าง `text5.json` + `pic5.jpg` — จบ (ไม่ต้องแก้โค้ด)
> แก้ไฟล์แล้วกด F5 เห็นผลทันที (โหลดแบบ network-first)
Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

+19
View File
@@ -0,0 +1,19 @@
{
"date": "2026-09-14",
"th": {
"title": "เปิดเพิ่ม 3 เส้นทางช่วงปลายฝน",
"tag": "ข่าว",
"body": [
"ช่วงปลายฝนนี้มีเส้นทางใหม่เปิดให้บริการเพิ่ม 3 เส้นทาง เชื่อมต่ออ่างทองกับจังหวัดใกล้เคียง เริ่มตั้งแต่ต้นเดือนตุลาคมเป็นต้นไป",
"ตารางเดินรถของเส้นทางใหม่จะอัปเดตในหน้า “เช็กเวลาเดินรถ” ทันทีที่ผู้ประกอบการยืนยันรอบวิ่ง — ฝากติดตามไว้ด้วยครับ"
]
},
"en": {
"title": "Three new routes open this rainy season",
"tag": "News",
"body": [
"Three new routes connecting Ang Thong with nearby provinces will start service in early October.",
"Their schedules will appear on the Check Schedules page as soon as operators confirm the trips — stay tuned."
]
}
}
+19
View File
@@ -0,0 +1,19 @@
{
"date": "2026-09-10",
"th": {
"title": "วิธีดูว่ารถสาย 101 ผ่านป้ายเรากี่โมง",
"tag": "วิธีใช้",
"body": [
"เปิดหน้าป้ายหยุดรถ เลือกป้ายที่ต้องการ แล้วดูรายการ “สายรถที่ผ่านจุดนี้” — ระบบจะไฮไลต์เที่ยวถัดไปให้อัตโนมัติ",
"ถ้าต้องการดูทุกจุดจอดของสาย เข้าเมนูรายละเอียดสายรถ หรือกดปุ่มเช็กเวลาเดินรถเพื่อดูตารางแบบเต็มในหน้าเดียว"
]
},
"en": {
"title": "How to see when route 101 passes your stop",
"tag": "How-to",
"body": [
"Open Bus Stops, pick your stop, then check the routes serving it — the next departure is highlighted automatically.",
"For every stop along a route, open Route Details or hit Check Schedules for the full table in one page."
]
}
}
+19
View File
@@ -0,0 +1,19 @@
{
"date": "2026-09-05",
"th": {
"title": "อัปเดตตารางเดินรถสาย 902",
"tag": "อัปเดต",
"body": [
"สาย 902 (กรุงเทพ–อ่างทอง สายเอเซีย) ปรับรอบวิ่งช่วงเย็นจากเดิมออกทุก 50 นาที เป็นทุก 40 นาที ตั้งแต่วันที่ 1 กันยายน",
"รอบเช้าและรอบกลางวันยังคงเดิม หากมีเปลี่ยนแปลงเพิ่มเติมจะแจ้งผ่าน LINE Official ของสายโดยตรง"
]
},
"en": {
"title": "Route 902 timetable update",
"tag": "Update",
"body": [
"Route 902 (Bangkok–Ang Thong, Asia line) now departs every 40 minutes in the evening instead of 50, effective 1 September.",
"Morning and midday trips are unchanged. Further changes will be announced via the line's LINE Official."
]
}
}
+19
View File
@@ -0,0 +1,19 @@
{
"date": "2026-08-28",
"th": {
"title": "ทำไมตารางรถถึงเปลี่ยนบ่อย",
"tag": "ความรู้",
"body": [
"ตารางเดินรถของรถโดยสารประจำทางเปลี่ยนได้ตามสภาพการจราจร จำนวนผู้โดยสาร และช่วงเทศกาล — บางสายปรับตามวันหยุดอีกด้วย",
"เราจึงแสดงเวลาดิบจากผู้ประกอบการเสมอ และมีหมายเหตุเตือนให้เช็กเวลากับทางสายโดยตรงก่อนเดินทางในวันที่ฝนตกหรือวันหยุดยาว"
]
},
"en": {
"title": "Why bus timetables change so often",
"tag": "Explainer",
"body": [
"Bus schedules shift with traffic, passenger demand and seasonal peaks — some lines even differ on holidays.",
"That's why we show operators' raw times and remind you to double-check with the operator before travelling in heavy rain or long holidays."
]
}
}
+168
View File
@@ -0,0 +1,168 @@
<style>
/* ===== หน้าบทความ — ข้อมูลจาก partials/blog-data/ (ระบบเดียวกับ about) ===== */
.mu-hero-lead {
margin: 14px auto 0;
max-width: 640px;
color: #5b3b71;
font-size: .95rem;
}
.mu-blog-wrap { padding: 26px 0 52px; }
/* --- แถบสลับมุมมอง (ตาราง / รายการ) --- */
.mu-blog-bar {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 12px;
margin-bottom: 18px;
}
.mu-blog-count { margin: 0; color: #6f7b95; font-size: .88rem; }
.mu-view-switch {
margin-left: auto;
display: inline-flex;
gap: 2px;
background: #f0edf7;
border: 1px solid #e4dcf2;
border-radius: 999px;
padding: 3px;
}
.mu-view-btn {
display: inline-flex;
align-items: center;
gap: 6px;
border: 0;
background: transparent;
color: #6d28d9;
font-family: inherit;
font-weight: 700;
font-size: .8rem;
min-height: 36px;
padding: 6px 14px;
border-radius: 999px;
cursor: pointer;
transition: background .15s ease, color .15s ease;
}
.mu-view-btn .ic { width: 15px; height: 15px; }
.mu-view-btn.active { background: #fff; color: #7a4cc0; box-shadow: 0 1px 4px rgba(63, 43, 94, .18); }
.mu-view-btn:focus-visible { outline: 2px solid #7a4cc0; outline-offset: 2px; }
/* --- โหมดตาราง (grid) --- */
#blog-list.mode-grid {
display: grid;
grid-template-columns: 1fr;
gap: 18px;
}
.mu-blog-card {
display: flex;
flex-direction: column;
background: #fff;
border: 1px solid #ebe8f4;
border-radius: 18px;
overflow: hidden;
box-shadow: 0 10px 26px rgba(63, 43, 94, .07);
text-decoration: none;
color: inherit;
transition: transform .18s ease, box-shadow .18s ease;
}
.mu-blog-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(63, 43, 94, .14); }
.mu-blog-card .mu-cover { aspect-ratio: 16 / 9; }
.mu-blog-card .mu-cover.no-img { background: linear-gradient(135deg, #7a4cc0, #3071b8); }
.mu-blog-card .mu-cover.no-img::after { background: linear-gradient(180deg, rgba(15,23,42,0) 40%, rgba(15,23,42,.4) 100%); }
.mu-blog-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.mu-blog-meta { display: flex; align-items: center; gap: 8px; color: #6f7b95; font-size: .78rem; }
.mu-blog-meta time { font-variant-numeric: tabular-nums; }
.mu-blog-card h2 { margin: 0; font-size: 1.02rem; color: #1f2a44; font-weight: 800; line-height: 1.4; }
.mu-blog-excerpt { margin: 0; color: #4a5568; font-size: .88rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mu-blog-more { margin-top: auto; padding-top: 6px; color: #7a4cc0; font-weight: 700; font-size: .85rem; }
/* --- โหมดรายการ (list) --- */
#blog-list.mode-list { display: flex; flex-direction: column; gap: 14px; }
.mu-blog-row {
display: grid;
grid-template-columns: 108px 1fr;
gap: 14px;
align-items: center;
background: #fff;
border: 1px solid #ebe8f4;
border-radius: 16px;
padding: 12px;
box-shadow: 0 8px 20px rgba(63, 43, 94, .06);
text-decoration: none;
color: inherit;
transition: border-color .15s ease, box-shadow .15s ease;
}
.mu-blog-row:hover { border-color: #d8c9f2; box-shadow: 0 12px 26px rgba(63, 43, 94, .12); }
.mu-blog-row .thumb {
width: 108px; height: 84px;
border-radius: 12px;
object-fit: cover;
display: block;
background: linear-gradient(135deg, #7a4cc0, #3071b8);
}
.mu-blog-row h2 { margin: 4px 0 6px; font-size: .98rem; color: #1f2a44; font-weight: 800; line-height: 1.4; }
.mu-blog-row .mu-blog-excerpt { -webkit-line-clamp: 2; }
.mu-blog-empty { color: #6f7b95; text-align: center; padding: 34px 0; }
.mu-blog-skel { height: 220px; border-radius: 18px; background: linear-gradient(90deg, #f4f2fa 25%, #ece8f6 37%, #f4f2fa 63%); background-size: 400% 100%; animation: muSkelB 1.4s ease infinite; }
@keyframes muSkelB { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
/* --- หน้าอ่านบทความ --- */
.mu-post { background: #fff; border: 1px solid #ebe8f4; border-radius: 20px; overflow: hidden; box-shadow: 0 12px 30px rgba(63, 43, 94, .08); }
.mu-post .mu-cover { aspect-ratio: 16 / 8; }
.mu-post-body { padding: 20px 18px 26px; }
.mu-post-body h1 { margin: 6px 0 12px; font-size: 1.35rem; color: #1f2a44; font-weight: 800; line-height: 1.4; }
.mu-post-body p { margin: 0 0 14px; color: #4a5568; font-size: .96rem; line-height: 1.9; }
.mu-post-body p:last-child { margin-bottom: 0; }
.mu-post-back {
display: inline-flex; align-items: center; gap: 6px;
margin-bottom: 16px; color: #7a4cc0; font-weight: 700;
text-decoration: none; font-size: .9rem;
}
.mu-post-back:hover { text-decoration: underline; }
/* แท็บเล็ตขึ้นไป: การ์ด 2 คอลัมน์ → 3 คอลัมน์ */
@media (min-width: 640px) {
#blog-list.mode-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
#blog-list.mode-grid { grid-template-columns: repeat(3, 1fr); }
.mu-post-body { padding: 26px 30px 34px; }
}
</style>
<!-- ============ HERO ============ -->
<section class="mu-hero">
<img class="mu-hero-map" src="../.image/network/overview-map.png" alt="" aria-hidden="true" decoding="async">
<div class="mu-blob one"></div>
<div class="mu-blob two"></div>
<div class="mu-blob three"></div>
<div class="mu-container mu-hero-content">
<span class="mu-badge"><svg class="ic" aria-hidden="true"><use href="#ic-message-circle"/></svg> <span data-i18n="nav.blog">บ่นไปเรื่อย</span></span>
<h1><span data-i18n="blog.title">บ่นไปเรื่อย</span><br><span class="mu-gradient-text" data-i18n="blog.subtitle">หน้านี้ก็เหมือนไดอารี่ของเรา อยากบ่นอะไรก็บ่น</span></h1>
<p class="mu-hero-lead" data-i18n="blog.lead">ขอบคุณที่เข้ามาอ่านบางบทความก็มีสาระบางบทความก็ไม่มีสาระ </p>
</div>
</section>
<!-- ============ รายการบทความ (โหลดจาก blog-data: text1.json + pic1, ...) ============ -->
<section class="mu-blog-wrap">
<div class="mu-container">
<div class="mu-blog-bar" id="blog-bar" hidden>
<p class="mu-blog-count" id="blog-count"></p>
<div class="mu-view-switch" role="group" aria-label="มุมมอง">
<button type="button" class="mu-view-btn" data-view="grid">
<svg class="ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect width="7" height="7" x="3" y="3" rx="1"/><rect width="7" height="7" x="14" y="3" rx="1"/><rect width="7" height="7" x="14" y="14" rx="1"/><rect width="7" height="7" x="3" y="14" rx="1"/></svg>
<span data-i18n="blog.viewGrid">ตาราง</span>
</button>
<button type="button" class="mu-view-btn" data-view="list">
<svg class="ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="8" x2="21" y1="6" y2="6"/><line x1="8" x2="21" y1="12" y2="12"/><line x1="8" x2="21" y1="18" y2="18"/><line x1="3" x2="3.01" y1="6" y2="6"/><line x1="3" x2="3.01" y1="12" y2="12"/><line x1="3" x2="3.01" y1="18" y2="18"/></svg>
<span data-i18n="blog.viewList">รายการ</span>
</button>
</div>
</div>
<div id="blog-list" aria-live="polite">
<div class="mu-blog-skel"></div>
</div>
</div>
</section>
<script src="./partials/blog.init.js"></script>
+264
View File
@@ -0,0 +1,264 @@
/* ============================================================
หน้าบทความ — loader + สลับมุมมอง ตาราง/รายการ + หน้าอ่านบทความ
------------------------------------------------------------
ข้อมูล: partials/blog-data/ (ระบบเดียวกับ about us)
text1.json + pic1.<ext> , text2.json + pic2.<ext> , ...
{ "th": { "title","body":["..."],"tag" }, "en": {...}, "date": "2026-09-01" }
route:
#/blog → รายการบทความ (มุมมอง grid/list — จำค่าใน localStorage)
#/blog/:n → อ่านบทความที่ n
============================================================ */
(function () {
'use strict';
var DATA_DIR = './partials/blog-data/';
var IMG_EXTS = ['jpg', 'jpeg', 'png', 'webp'];
var MAX_POSTS = 50;
var LS_VIEW = 'at_blog_view';
var EXCERPT_LEN = 150;
function lang() { return (window.I18N && I18N.getLang()) || 'th'; }
function t(key) { return window.I18N ? I18N.t(key) : key; }
function pick(data, l) {
if (!data) return null;
if (l !== 'th' && data[l]) return data[l];
return data.th || data[l] || data[Object.keys(data)[0]] || data;
}
function fetchJSON(n) {
return fetch(DATA_DIR + 'text' + n + '.json', { cache: 'no-store' })
.then(function (r) { return r.ok ? r.json() : null; })
.catch(function () { return null; });
}
function findImage(n) {
var i = 0;
function tryNext() {
if (i >= IMG_EXTS.length) return Promise.resolve(null);
var url = DATA_DIR + 'pic' + n + '.' + IMG_EXTS[i++];
return fetch(url, { method: 'HEAD', cache: 'no-store' })
.then(function (r) { return r.ok ? url : tryNext(); })
.catch(tryNext);
}
return tryNext();
}
function loadPosts() {
var posts = [];
var n = 1;
function next() {
if (n > MAX_POSTS) return Promise.resolve(posts);
var current = n++;
return fetchJSON(current).then(function (data) {
if (!data) return posts;
return findImage(current).then(function (imgUrl) {
posts.push({ n: current, data: data, img: imgUrl });
return next();
});
});
}
return next();
}
function getView() {
try {
var v = localStorage.getItem(LS_VIEW);
return v === 'list' ? 'list' : 'grid';
} catch (e) { return 'grid'; }
}
function setView(v) {
try { localStorage.setItem(LS_VIEW, v); } catch (e) {}
}
function readTime(body) {
var words = (body || []).join(' ').length;
return Math.max(1, Math.round(words / 350)); // ~350 ตัวอักษร/นาที
}
function renderGrid(posts, host) {
posts.forEach(function (p) {
var c = pick(p.data, lang());
var a = document.createElement('a');
a.className = 'mu-blog-card';
a.href = '#/blog/' + p.n;
var cover = document.createElement('div');
cover.className = 'mu-cover' + (p.img ? '' : ' no-img');
if (p.img) {
var im = document.createElement('img');
im.src = p.img; im.alt = ''; im.loading = 'lazy'; im.decoding = 'async';
cover.appendChild(im);
}
if (c.tag) {
var tag = document.createElement('span');
tag.className = 'mu-cover-tag';
tag.textContent = c.tag;
cover.appendChild(tag);
}
var ct = document.createElement('p');
ct.className = 'mu-cover-title';
ct.textContent = c.title || '';
cover.appendChild(ct);
a.appendChild(cover);
var body = document.createElement('div');
body.className = 'mu-blog-body';
body.innerHTML = '<div class="mu-blog-meta"></div><h2></h2><p class="mu-blog-excerpt"></p><span class="mu-blog-more"></span>';
body.querySelector('h2').textContent = c.title || '';
body.querySelector('.mu-blog-excerpt').textContent = (c.body || []).join(' ').slice(0, EXCERPT_LEN) + '…';
body.querySelector('.mu-blog-more').textContent = t('blog.readMore') + ' →';
var meta = body.querySelector('.mu-blog-meta');
if (p.data.date) {
var tm = document.createElement('time');
tm.dateTime = p.data.date;
tm.textContent = p.data.date;
meta.appendChild(tm);
var dot = document.createElement('span'); dot.textContent = '·'; meta.appendChild(dot);
}
var rt = document.createElement('span');
rt.textContent = readTime(c.body) + ' ' + t('blog.minRead');
meta.appendChild(rt);
a.appendChild(body);
host.appendChild(a);
});
}
function renderList(posts, host) {
posts.forEach(function (p) {
var c = pick(p.data, lang());
var a = document.createElement('a');
a.className = 'mu-blog-row';
a.href = '#/blog/' + p.n;
if (p.img) {
var im = document.createElement('img');
im.className = 'thumb'; im.src = p.img; im.alt = ''; im.loading = 'lazy'; im.decoding = 'async';
a.appendChild(im);
}
var box = document.createElement('div');
box.innerHTML = '<div class="mu-blog-meta"></div><h2></h2><p class="mu-blog-excerpt"></p>';
box.querySelector('h2').textContent = c.title || '';
box.querySelector('.mu-blog-excerpt').textContent = (c.body || []).join(' ').slice(0, 110) + '…';
var meta = box.querySelector('.mu-blog-meta');
var bits = [];
if (p.data.date) bits.push(p.data.date);
if (c.tag) bits.push(c.tag);
bits.push(readTime(c.body) + ' ' + t('blog.minRead'));
meta.textContent = bits.join(' · ');
a.appendChild(box);
host.appendChild(a);
});
}
function renderPost(post, host) {
var c = pick(post.data, lang());
var art = document.createElement('article');
art.className = 'mu-post';
if (post.img) {
var cover = document.createElement('div');
cover.className = 'mu-cover';
var im = document.createElement('img');
im.src = post.img; im.alt = c.title || ''; im.decoding = 'async';
cover.appendChild(im);
if (c.tag) {
var tag = document.createElement('span');
tag.className = 'mu-cover-tag';
tag.textContent = c.tag;
cover.appendChild(tag);
}
art.appendChild(cover);
}
var body = document.createElement('div');
body.className = 'mu-post-body';
var back = document.createElement('a');
back.className = 'mu-post-back';
back.href = '#/blog';
back.textContent = '← ' + t('blog.backList');
body.appendChild(back);
var meta = document.createElement('div');
meta.className = 'mu-blog-meta';
var bits = [];
if (post.data.date) bits.push(post.data.date);
bits.push(readTime(c.body) + ' ' + t('blog.minRead'));
meta.textContent = bits.join(' · ');
body.appendChild(meta);
var h1 = document.createElement('h1');
h1.textContent = c.title || '';
body.appendChild(h1);
(c.body || []).forEach(function (pText) {
var p = document.createElement('p');
p.textContent = pText;
body.appendChild(p);
});
art.appendChild(body);
host.appendChild(art);
}
function init() {
var host = document.getElementById('blog-list');
if (!host) return;
var route = window.__route || { params: {} };
var postId = route.params && route.params.postId;
loadPosts().then(function (posts) {
host.innerHTML = '';
if (postId) {
var post = posts.filter(function (p) { return String(p.n) === String(postId); })[0];
var bar = document.getElementById('blog-bar');
if (bar) bar.hidden = true;
if (post) {
renderPost(post, host);
} else {
host.innerHTML = '<p class="mu-blog-empty">' + t('blog.notFound') + '</p>';
}
return;
}
if (!posts.length) {
host.innerHTML = '<p class="mu-blog-empty">' + t('blog.empty') + '</p>';
return;
}
var bar = document.getElementById('blog-bar');
var count = document.getElementById('blog-count');
if (count) count.textContent = t('blog.count') + ' ' + posts.length + ' ' + t('blog.items');
if (bar) bar.hidden = false;
var mode = getView();
function paint() {
host.className = mode === 'list' ? 'mode-list' : 'mode-grid';
host.innerHTML = '';
(mode === 'list' ? renderList : renderGrid)(posts, host);
document.querySelectorAll('.mu-view-btn').forEach(function (b) {
b.classList.toggle('active', b.getAttribute('data-view') === mode);
b.setAttribute('aria-pressed', String(b.getAttribute('data-view') === mode));
});
}
paint();
document.querySelectorAll('.mu-view-btn').forEach(function (b) {
b.addEventListener('click', function () {
mode = b.getAttribute('data-view');
setView(mode);
paint();
});
});
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', init);
} else {
init();
}
})();
+6 -39
View File
@@ -96,25 +96,6 @@
border-color: #c8b4ec; border-color: #c8b4ec;
} }
.mu-province-strip {
display:flex;
flex-wrap:wrap;
gap:8px;
margin: 14px 0 18px;
}
.mu-province-strip a {
background: linear-gradient(135deg, #ffffff, #f6f8ff);
border: 1px solid #e7e3f7;
padding: 8px 14px;
border-radius: 999px;
color: #5b3b71;
text-decoration:none;
font-size:.84rem;
font-weight:700;
box-shadow: 0 6px 14px rgba(63,43,94,.05);
}
.mu-province-strip a.active { background: linear-gradient(135deg, #7a4cc0, #8b5cf6); color:#fff; border-color: transparent; }
.mu-stop-grid { .mu-stop-grid {
display:grid; display:grid;
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
@@ -258,7 +239,7 @@
<p class="mu-breadcrumb"><a href="#/">หน้าแรก</a>/ ป้ายหยุดรถ</p> <p class="mu-breadcrumb"><a href="#/">หน้าแรก</a>/ ป้ายหยุดรถ</p>
<section class="mu-hero-panel"> <section class="mu-hero-panel">
<div> <div>
<h1 class="mu-hero-title"><span data-i18n="stops.title">ค้นหาป้ายหยุดรถแบบรวดเร็วและอ่านง่าย</span></h1> <h1 class="mu-hero-title"><span data-i18n="stops.title">ค้นหาป้ายหยุดรถแบบรวดเร็ว</span></h1>
<p class="mu-hero-subtitle"><span data-i18n="stops.subtitle">รวมสถานีขนส่งหลัก จุดจอดท้องถิ่น สถานีรถตู้ และจุดเอกชนในโทน soft gradient ที่ดูสะอาดตา ใช้งานได้ทั้งบนมือถือและเดสก์ท็อป</span></p> <p class="mu-hero-subtitle"><span data-i18n="stops.subtitle">รวมสถานีขนส่งหลัก จุดจอดท้องถิ่น สถานีรถตู้ และจุดเอกชนในโทน soft gradient ที่ดูสะอาดตา ใช้งานได้ทั้งบนมือถือและเดสก์ท็อป</span></p>
<div class="mu-kpi-grid" aria-label="summary metrics"> <div class="mu-kpi-grid" aria-label="summary metrics">
<div class="mu-kpi"> <div class="mu-kpi">
@@ -281,7 +262,7 @@
</div> </div>
<div class="mu-hero-map"> <div class="mu-hero-map">
<p class="mu-hero-map-title"><span data-i18n="stops.mapTitle">แผนที่ย่อของเครือข่ายป้าย</span></p> <p class="mu-hero-map-title"><span data-i18n="stops.mapTitle">แผนที่ย่อของเครือข่ายป้าย</span></p>
<img class="mu-hero-map-photo" src="../.image/network/overview-map.png" alt="แผนที่เครือข่ายป้าย AT Transit" loading="lazy" decoding="async"> <img class="mu-hero-map-photo" src="../.image/network/overview-map.png" alt="แผนที่เครือข่ายป้าย Atroute" loading="lazy" decoding="async">
</div> </div>
</section> </section>
@@ -290,30 +271,16 @@
<svg class="ic" aria-hidden="true"><use href="#ic-search"/></svg> <svg class="ic" aria-hidden="true"><use href="#ic-search"/></svg>
<input type="search" placeholder="ค้นหาชื่อสถานที่ เช่น บขส.อ่างทอง" data-i18n-attr="placeholder:stops.searchPh,aria-label:stops.searchPh"> <input type="search" placeholder="ค้นหาชื่อสถานที่ เช่น บขส.อ่างทอง" data-i18n-attr="placeholder:stops.searchPh,aria-label:stops.searchPh">
</div> </div>
<select aria-label="ประเภทสถานี"> <select aria-label="ประเภทป้ายหยุดรถ">
<option><span data-i18n="stops.allTypes">ทุกประเภท</span></option> <option><span data-i18n="stops.allTypes">ทุกประเภท</span></option>
<option><span data-i18n="type.terminal">สถานีขนส่งหลัก</span></option> <option><span data-i18n="type.terminal">สถานีขนส่งผู้โดยสาร</span></option>
<option><span data-i18n="type.van">สถานีรถตู้</span></option> <option><span data-i18n="type.busstop">ศาลารอรถ หรือป้ายหยุดรถ</span></option>
<option><span data-i18n="type.local">จุดจอดท้องถิ่น</span></option> <option><span data-i18n="type.startlocalpoint">ต้นทางรถสายท้องถิ่น</span></option>
<option><span data-i18n="type.marketOpt">ตลาด/จุดเอกชน</span></option>
</select> </select>
<button type="button" class="mu-btn primary"><span data-i18n="common.search">ค้นหา</span></button> <button type="button" class="mu-btn primary"><span data-i18n="common.search">ค้นหา</span></button>
<a class="mu-btn ghost" href="#/"><span data-i18n="common.back">ย้อนกลับ</span></a> <a class="mu-btn ghost" href="#/"><span data-i18n="common.back">ย้อนกลับ</span></a>
</form> </form>
<div class="mu-province-strip" aria-label="กรองตามจังหวัด">
<a class="active" href="#"><span data-i18n="stops.allProvinces">ทุกจังหวัด</span></a>
<a href="#">อ่างทอง</a>
<a href="#">อยุธยา</a>
<a href="#">ปทุมธานี</a>
<a href="#">กรุงเทพมหานคร</a>
<a href="#">สุพรรณบุรี</a>
<a href="#">สระบุรี</a>
<a href="#">ลพบุรี</a>
<a href="#">สิงห์บุรี</a>
<a href="#">ชัยนาท</a>
</div>
<ul class="mu-stop-grid"> <ul class="mu-stop-grid">
<li><img class="mu-stop-thumb" src="../.image/stops/54950.jpg" alt="" loading="lazy" decoding="async"><div class="mu-stop-card main"><div class="mu-stop-top"><div><span class="mu-type-pill main"><span data-i18n="type.terminal">สถานีขนส่งหลัก</span></span><h2 class="mu-stop-title">บขส.อ่างทอง</h2><p class="mu-loc">เมืองอ่างทอง · อ่างทอง</p></div><span class="mu-chip count">8 สาย</span></div><div class="mu-chip-row"><span class="mu-chip route">สายหลัก</span><span class="mu-chip">เปิดบริการ</span></div><div class="mu-stop-action"><p class="mu-stop-note">ศูนย์กลางเส้นทางหลักของจังหวัด</p><a class="mu-row-link" href="#/stops/at_main_terminal?route=101"><span data-i18n="common.details">ดูรายละเอียด</span></a></div></div></li> <li><img class="mu-stop-thumb" src="../.image/stops/54950.jpg" alt="" loading="lazy" decoding="async"><div class="mu-stop-card main"><div class="mu-stop-top"><div><span class="mu-type-pill main"><span data-i18n="type.terminal">สถานีขนส่งหลัก</span></span><h2 class="mu-stop-title">บขส.อ่างทอง</h2><p class="mu-loc">เมืองอ่างทอง · อ่างทอง</p></div><span class="mu-chip count">8 สาย</span></div><div class="mu-chip-row"><span class="mu-chip route">สายหลัก</span><span class="mu-chip">เปิดบริการ</span></div><div class="mu-stop-action"><p class="mu-stop-note">ศูนย์กลางเส้นทางหลักของจังหวัด</p><a class="mu-row-link" href="#/stops/at_main_terminal?route=101"><span data-i18n="common.details">ดูรายละเอียด</span></a></div></div></li>
<li><img class="mu-stop-thumb" src="../.image/stops/36020.jpg" alt="" loading="lazy" decoding="async"><div class="mu-stop-card main"><div class="mu-stop-top"><div><span class="mu-type-pill main"><span data-i18n="type.terminal">สถานีขนส่งหลัก</span></span><h2 class="mu-stop-title">สถานีขนส่งป่าโมก</h2><p class="mu-loc">ป่าโมก · อ่างทอง</p></div><span class="mu-chip count">2 สาย</span></div><div class="mu-chip-row"><span class="mu-chip route">จุดต่อรถ</span><span class="mu-chip">Hub ย่อย</span></div><div class="mu-stop-action"><p class="mu-stop-note">เหมาะสำหรับต่อรถไปอยุธยา</p><a class="mu-row-link" href="#/stops/pa_mok_terminal?route=101"><span data-i18n="common.details">ดูรายละเอียด</span></a></div></div></li> <li><img class="mu-stop-thumb" src="../.image/stops/36020.jpg" alt="" loading="lazy" decoding="async"><div class="mu-stop-card main"><div class="mu-stop-top"><div><span class="mu-type-pill main"><span data-i18n="type.terminal">สถานีขนส่งหลัก</span></span><h2 class="mu-stop-title">สถานีขนส่งป่าโมก</h2><p class="mu-loc">ป่าโมก · อ่างทอง</p></div><span class="mu-chip count">2 สาย</span></div><div class="mu-chip-row"><span class="mu-chip route">จุดต่อรถ</span><span class="mu-chip">Hub ย่อย</span></div><div class="mu-stop-action"><p class="mu-stop-note">เหมาะสำหรับต่อรถไปอยุธยา</p><a class="mu-row-link" href="#/stops/pa_mok_terminal?route=101"><span data-i18n="common.details">ดูรายละเอียด</span></a></div></div></li>
+1 -1
View File
@@ -88,7 +88,7 @@
<section class="mu-credit-section"> <section class="mu-credit-section">
<h2><span data-i18n="credits.pwa">โหมดออฟไลน์ (PWA / Service Worker)</span></h2> <h2><span data-i18n="credits.pwa">โหมดออฟไลน์ (PWA / Service Worker)</span></h2>
<p class="src">พัฒนาโดยทีม AT Transit — ไม่ใช้ไลบรารีภายนอก</p> <p class="src">พัฒนาโดยทีม Atroute — ไม่ใช้ไลบรารีภายนอก</p>
<ul> <ul>
<li>เว็บนี้เป็น Progressive Web App — ติดตั้งได้ (Add to Home Screen) และเปิดใช้งานได้เมื่อไม่มีอินเทอร์เน็ต</li> <li>เว็บนี้เป็น Progressive Web App — ติดตั้งได้ (Add to Home Screen) และเปิดใช้งานได้เมื่อไม่มีอินเทอร์เน็ต</li>
<li>อัปเดตเนื้อหาอัตโนมัติ: เมื่อเปิดเว็บ ระบบจะตรวจสอบเวอร์ชันใหม่และโหลดให้เอง — ผู้ใช้ไม่ต้องล้างแคช</li> <li>อัปเดตเนื้อหาอัตโนมัติ: เมื่อเปิดเว็บ ระบบจะตรวจสอบเวอร์ชันใหม่และโหลดให้เอง — ผู้ใช้ไม่ต้องล้างแคช</li>
+80 -76
View File
@@ -1,50 +1,21 @@
(function () { (function () {
'use strict'; 'use strict';
var PROVINCES = [ // แหล่งข้อมูลเดียว (source of truth) — อย่า hardcode รายชื่อจังหวัด/สถานีไว้ในไฟล์นี้
'กรุงเทพมหานคร', 'กระบี่', 'กาญจนบุรี', 'กาฬสินธุ์', 'กำแพงเพชร', 'ขอนแก่น', var DATA_URL = {
'จันทบุรี', 'ฉะเชิงเทรา', 'ชลบุรี', 'ชัยนาท', 'ชัยภูมิ', 'ชุมพร', 'เชียงราย', 'เชียงใหม่', provinces: '../resource/data/provinces.json',
'ตรัง', 'ตราด', 'ตาก', 'นครนายก', 'นครปฐม', 'นครพนม', 'นครราชสีมา', 'นครศรีธรรมราช', stations: '../resource/data/stations.json'
'นครสวรรค์', 'นนทบุรี', 'นราธิวาส', 'น่าน', 'บึงกาฬ', 'บุรีรัมย์', 'ปทุมธานี',
'ประจวบคีรีขันธ์', 'ปราจีนบุรี', 'ปัตตานี', 'พระนครศรีอยุธยา', 'พะเยา', 'พังงา', 'พัทลุง',
'พิจิตร', 'พิษณุโลก', 'เพชรบุรี', 'เพชรบูรณ์', 'แพร่', 'ภูเก็ต', 'มหาสารคาม', 'มุกดาหาร',
'แม่ฮ่องสอน', 'ยโสธร', 'ยะลา', 'ร้อยเอ็ด', 'ระนอง', 'ระยอง', 'ราชบุรี', 'ลพบุรี',
'ลำปาง', 'ลำพูน', 'เลย', 'ศรีสะเกษ', 'สกลนคร', 'สงขลา', 'สตูล', 'สมุทรปราการ',
'สมุทรสงคราม', 'สมุทรสาคร', 'สระแก้ว', 'สระบุรี', 'สิงห์บุรี', 'สุโขทัย', 'สุพรรณบุรี',
'สุราษฎร์ธานี', 'สุรินทร์', 'หนองคาย', 'หนองบัวลำภู', 'อ่างทอง', 'อำนาจเจริญ', 'อุดรธานี',
'อุตรดิตถ์', 'อุทัยธานี', 'อุบลราชธานี'
];
var STATIONS_BY_PROVINCE = {
'อ่างทอง': [
'บขส.อ่างทอง',
'สถานีขนส่งป่าโมก',
'สถานีขนส่งวิเศษชัยชาญ',
'สถานีขนส่งไชโย',
'สถานีขนส่งโพธิ์ทอง',
'สถานีขนส่งแสวงหา',
'สถานีขนส่งสามโก้',
'นะโมซุปเปอร์มาร์ท',
'บขส.999 อ่างทอง สายเอเชีย-เหนือ (ไม่เข้าเมือง)',
'จุดขึ้นรถประจำทางอื่นๆ'
],
'พระนครศรีอยุธยา': [
'จุดขึ้นลงรถสองแถว 101 อยุธยา-ป่าโมก-อ่างทอง',
'ตลาดเจ้าพรหม'
],
'ปทุมธานี': ['ท่ารถตู้ต่างจังหวัด รังสิต'],
'กรุงเทพมหานคร': [
'สถานีเดินรถโดยสารขนาดเล็ก (จตุจักร) รถตู้/มินิบัส',
'สายใต้เก่า ปิ่นเกล้า จุดจอดรถตู้'
],
'ลพบุรี': ['บขส.ลพบุรี'],
'สุพรรณบุรี': ['บขส.สุพรรณบุรี'],
'สระบุรี': ['บขส.สระบุรี'],
'ชัยนาท': ['บขส.ชัยนาท']
}; };
// จังหวัดเริ่มต้น (home province ของเว็บนี้) — ใช้เป็นค่า default ของ hero + ตัวเลือก
var DEFAULT_PROVINCE = 'อ่างทอง'; var DEFAULT_PROVINCE = 'อ่างทอง';
function fetchJSON(url) {
return fetch(url, { cache: 'no-store' })
.then(function (r) { return r.ok ? r.json() : null; })
.catch(function () { return null; });
}
function initHomeSelectors() { function initHomeSelectors() {
var provinceSelect = document.getElementById('province-select'); var provinceSelect = document.getElementById('province-select');
var stationSelect = document.getElementById('station-select'); var stationSelect = document.getElementById('station-select');
@@ -52,45 +23,78 @@
var heroProvince = document.getElementById('hero-province'); var heroProvince = document.getElementById('hero-province');
if (!provinceSelect || !stationSelect) return; if (!provinceSelect || !stationSelect) return;
provinceSelect.innerHTML = ''; var tr = window.I18N ? window.I18N.t : function (k) { return k; };
PROVINCES.forEach(function (name) {
var opt = document.createElement('option');
opt.value = name;
opt.textContent = name;
if (name === DEFAULT_PROVINCE) opt.selected = true;
provinceSelect.appendChild(opt);
});
function populateStations(province) { // โหลดจังหวัด + สถานี จาก resource/data/*.json (โหลดพร้อมกันรอบเดียว)
stationSelect.innerHTML = ''; Promise.all([
var stations = STATIONS_BY_PROVINCE[province] || []; fetchJSON(DATA_URL.provinces),
var tr = window.I18N ? window.I18N.t : function (k) { return k; }; fetchJSON(DATA_URL.stations)
if (stations.length === 0) { ]).then(function (results) {
var empty = document.createElement('option'); var provincesData = results[0];
empty.value = ''; var stationsData = results[1];
empty.textContent = tr('home.stationEmpty');
empty.disabled = true; var provinces = ((provincesData && provincesData.provinces) || [])
empty.selected = true; .map(function (p) { return p.province_name_th; })
stationSelect.appendChild(empty); .filter(Boolean);
if (stationHint) stationHint.textContent = tr('home.stationEmptyHint') + ' ' + province;
} else { var stations = (stationsData && stationsData.stations) || [];
stations.forEach(function (name) {
var opt = document.createElement('option'); if (!provinces.length) return; // โหลดข้อมูลไม่สำเร็จ → ปล่อย select ว่างไว้
opt.value = name;
opt.textContent = name; var selectedProvince = provinces.indexOf(DEFAULT_PROVINCE) !== -1
stationSelect.appendChild(opt); ? DEFAULT_PROVINCE
}); : provinces[0];
if (stationHint) stationHint.innerHTML = tr('home.stationCount', { n: stations.length }) + ' ' + province;
provinceSelect.innerHTML = '';
provinces.forEach(function (name) {
var opt = document.createElement('option');
opt.value = name;
opt.textContent = name;
if (name === selectedProvince) opt.selected = true;
provinceSelect.appendChild(opt);
});
function stationsFor(province) {
return stations
.filter(function (s) {
// สถานีที่ไม่มี province (เช่น "จุดขึ้นรถประจำทางอื่นๆ") ให้ถือว่าอยู่ในจังหวัดหลัก
var p = s.province_th || DEFAULT_PROVINCE;
return p === province;
})
.map(function (s) { return s.station_name_th; })
.filter(Boolean);
} }
var prefix = tr('home.provincePrefix');
if (heroProvince) heroProvince.textContent = (prefix ? prefix + ' ' : '') + province;
}
provinceSelect.addEventListener('change', function () { function populateStations(province) {
populateStations(provinceSelect.value); stationSelect.innerHTML = '';
var list = stationsFor(province);
if (list.length === 0) {
var empty = document.createElement('option');
empty.value = '';
empty.textContent = tr('home.stationEmpty');
empty.disabled = true;
empty.selected = true;
stationSelect.appendChild(empty);
if (stationHint) stationHint.textContent = tr('home.stationEmptyHint') + ' ' + province;
} else {
list.forEach(function (name) {
var opt = document.createElement('option');
opt.value = name;
opt.textContent = name;
stationSelect.appendChild(opt);
});
if (stationHint) stationHint.innerHTML = tr('home.stationCount', { n: list.length }) + ' ' + province;
}
var prefix = tr('home.provincePrefix');
if (heroProvince) heroProvince.textContent = (prefix ? prefix + ' ' : '') + province;
}
provinceSelect.addEventListener('change', function () {
populateStations(provinceSelect.value);
});
populateStations(selectedProvince);
}); });
populateStations(DEFAULT_PROVINCE);
} }
function initMarquee() { function initMarquee() {
@@ -105,4 +109,4 @@
initHomeSelectors(); initHomeSelectors();
initMarquee(); initMarquee();
})(); })();
+11
View File
@@ -83,4 +83,15 @@
<rect width="20" height="16" x="2" y="4" rx="2" /> <rect width="20" height="16" x="2" y="4" rx="2" />
<path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" /> <path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" />
</symbol> </symbol>
<symbol id="ic-accessibility" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="16" cy="4" r="1" /> <path d="m18 19 1-7-6 1" /> <path d="m5 8 3-3 5.5 3-2.36 3.5" /> <path d="M4.24 14.5a5 5 0 0 0 6.88 6" /> <path d="M13.76 17.5a5 5 0 0 0-6.88-6" /></symbol>
<symbol id="ic-banknote" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="12" x="2" y="6" rx="2" /> <circle cx="12" cy="12" r="2" /> <path d="M6 12h.01M18 12h.01" /></symbol>
<symbol id="ic-coffee" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 2v2" /> <path d="M14 2v2" /> <path d="M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1" /> <path d="M6 2v2" /></symbol>
<symbol id="ic-image" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2" /> <circle cx="9" cy="9" r="2" /> <path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" /></symbol>
<symbol id="ic-landmark" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 18v-7" /> <path d="M11.119 2.205a2 2 0 0 1 1.762 0l7.84 3.846A.5.5 0 0 1 20.5 7h-17a.5.5 0 0 1-.22-.949z" /> <path d="M14 18v-7" /> <path d="M18 18v-7" /> <path d="M3 22h18" /> <path d="M6 18v-7" /></symbol>
<symbol id="ic-navigation" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="3 11 22 2 13 21 11 13 3 11" /></symbol>
<symbol id="ic-route" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="6" cy="19" r="3" /> <path d="M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15" /> <circle cx="18" cy="5" r="3" /></symbol>
<symbol id="ic-shopping-bag" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 10a4 4 0 0 1-8 0" /> <path d="M3.103 6.034h17.794" /> <path d="M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z" /></symbol>
<symbol id="ic-store" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5" /> <path d="M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244" /> <path d="M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05" /></symbol>
<symbol id="ic-utensils" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2" /> <path d="M7 2v20" /> <path d="M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7" /></symbol>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

+1 -1
View File
@@ -1,5 +1,5 @@
/* ============================================================ /* ============================================================
AT Transit — PWA registration + auto-update Atroute — PWA registration + auto-update
ผู้ใช้ไม่ต้องล้างแคชเอง: ผู้ใช้ไม่ต้องล้างแคชเอง:
1. register แบบ updateViaCache:"none" → ไม่เชื่อ HTTP cache ของ sw.js 1. register แบบ updateViaCache:"none" → ไม่เชื่อ HTTP cache ของ sw.js
2. เรียก reg.update() ทุกครั้งที่โหลดหน้า → ตรวจ SW ใหม่ทันที 2. เรียก reg.update() ทุกครั้งที่โหลดหน้า → ตรวจ SW ใหม่ทันที
+1 -5
View File
@@ -1,5 +1,5 @@
/* ============================================================ /* ============================================================
AT Transit — Mobile-first responsive layer Atroute — Mobile-first responsive layer
------------------------------------------------------------ ------------------------------------------------------------
base = มือถือ (จอเล็กสุด iPhone 8 = 375px, รองรับ SE 320px) base = มือถือ (จอเล็กสุด iPhone 8 = 375px, รองรับ SE 320px)
ขยายขึ้นด้วย min-width: ขยายขึ้นด้วย min-width:
@@ -132,10 +132,6 @@ main.mu-container { padding-top: 14px; padding-bottom: 14px; }
#view .mu-toolbar .mu-btn { width: 100%; min-height: 44px; } #view .mu-toolbar .mu-btn { width: 100%; min-height: 44px; }
#view .mu-search-field { width: 100%; min-width: 0; } #view .mu-search-field { width: 100%; min-width: 0; }
#view .mu-search-field input { min-height: 44px; } #view .mu-search-field input { min-height: 44px; }
#view .mu-province-strip {
display: flex; flex-wrap: wrap; padding-bottom: 6px;
}
#view .mu-province-strip a { white-space: nowrap; min-height: 40px; }
#view .mu-stop-grid { grid-template-columns: 1fr; gap: 12px; } #view .mu-stop-grid { grid-template-columns: 1fr; gap: 12px; }
#view .mu-hero-map { min-height: 200px; } #view .mu-hero-map { min-height: 200px; }
+9 -2
View File
@@ -1,5 +1,5 @@
/* ============================================================ /* ============================================================
AT Transit — hash router (single-page app) Atroute — hash router (single-page app)
------------------------------------------------------------ ------------------------------------------------------------
สลับ view โดยไม่โหลดหน้าใหม่ (no reflash): สลับ view โดยไม่โหลดหน้าใหม่ (no reflash):
- #/ → หน้าแรก (partials/home.html) - #/ → หน้าแรก (partials/home.html)
@@ -25,6 +25,8 @@
check: { partial: 'partials/checkSchedule.html', nav: '/check', title: 'เช็กเวลาเดินรถ' }, check: { partial: 'partials/checkSchedule.html', nav: '/check', title: 'เช็กเวลาเดินรถ' },
stop: { partial: 'partials/stopDetail.html', nav: '/stops/', title: 'รายละเอียดป้าย' }, stop: { partial: 'partials/stopDetail.html', nav: '/stops/', title: 'รายละเอียดป้าย' },
credits: { partial: 'partials/credits.html', nav: '/credits', title: 'เครดิต' }, credits: { partial: 'partials/credits.html', nav: '/credits', title: 'เครดิต' },
about: { partial: 'partials/about.html', nav: '/about', title: 'เกี่ยวกับเรา' },
blog: { partial: 'partials/blog.html', nav: '/blog', title: 'บ่นไปเรื่อย' },
}; };
function parseHash() { function parseHash() {
@@ -49,6 +51,11 @@
return { name: 'stops', params: {}, query: query }; return { name: 'stops', params: {}, query: query };
} }
if (seg[0] === 'credits') return { name: 'credits', params: {}, query: query }; if (seg[0] === 'credits') return { name: 'credits', params: {}, query: query };
if (seg[0] === 'about') return { name: 'about', params: {}, query: query };
if (seg[0] === 'blog') {
if (seg[1]) return { name: 'blog', params: { postId: decodeURIComponent(seg[1]) }, query: query };
return { name: 'blog', params: {}, query: query };
}
if (seg[0] === 'check') return { name: 'check', params: {}, query: query }; if (seg[0] === 'check') return { name: 'check', params: {}, query: query };
return { name: 'home', params: {}, query: query }; return { name: 'home', params: {}, query: query };
} }
@@ -107,7 +114,7 @@
var stateEl = viewEl.querySelector('.mu-inline-context strong'); var stateEl = viewEl.querySelector('.mu-inline-context strong');
if (stateEl) stateEl.textContent = '?route=' + route.params.routeId; if (stateEl) stateEl.textContent = '?route=' + route.params.routeId;
} }
document.title = 'AT Transit — ' + view.title; document.title = 'Atroute — ' + view.title;
window.scrollTo(0, 0); window.scrollTo(0, 0);
}) })
.catch(function () { .catch(function () {
+2 -2
View File
@@ -2,7 +2,7 @@
<html lang="th"> <html lang="th">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>รายละเอียดป้าย | AT Transit</title> <title>รายละเอียดป้าย | Atroute</title>
<script> <script>
var m = /[?&]stop=([^&]+)/.exec(location.search); var m = /[?&]stop=([^&]+)/.exec(location.search);
var r = /[?&]route=([^&]+)/.exec(location.search); var r = /[?&]route=([^&]+)/.exec(location.search);
@@ -12,6 +12,6 @@
</script> </script>
</head> </head>
<body> <body>
<noscript><a href="./index.html">เปิด AT Transit</a></noscript> <noscript><a href="./index.html">เปิด Atroute</a></noscript>
</body> </body>
</html> </html>
+347
View File
@@ -0,0 +1,347 @@
<!DOCTYPE html>
<html lang="th">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>สถานีเดินรถโดยสารขนาดเล็ก (จตุจักร) รถตู้/มินิบัส — สายรถไปอ่างทอง | Atroute</title>
<meta name="description" content="สถานีเดินรถโดยสารขนาดเล็ก (จตุจักร) รถตู้/มินิบัส กรุงเทพมหานคร — สายรถไปอ่างทอง สาย 15 และ 902 พร้อมตารางเวลาออกรถทั้งวัน และสิ่งอำนวยความสะดวก">
<meta name="robots" content="index, follow">
<link rel="canonical" href="https://atroute.com/stops/chatuchak-minibus-terminal">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Atroute">
<meta property="og:title" content="สถานีเดินรถโดยสารขนาดเล็ก (จตุจักร) รถตู้/มินิบัส — สายรถไปอ่างทอง">
<meta property="og:description" content="สาย 15 และ 902 จากจตุจักรไปอ่างทอง พร้อมตารางเวลาทั้งวัน">
<meta property="og:locale" content="th_TH">
<meta name="theme-color" content="#0e1a13">
<link rel="icon" href="../../.image/icons/minibus-512x512.png">
<link href="https://fonts.googleapis.com/css2?family=Prompt:wght@400;500;600;700;800&family=Noto+Sans+Thai:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600;700&display=swap" rel="stylesheet">
<style>
/* ============================================================
หน้า static: สถานีจตุจักร — ตาม DESIGN.md (รัฐธรรมนูญการออกแบบ)
โทเคนสี/ฟอนต์/รัศมี มาจาก DESIGN.md หัวข้อ 3–4 เท่านั้น
============================================================ */
:root {
/* พื้นฐาน — DESIGN.md §3 */
--board: #0e1a13;
--ink: #14211a;
--paper: #f7f1e2;
--card: #fffdf6;
--line: #ddd5c0;
--muted: #6b7268;
/* สีประจำตัวรถโดยสารไทย */
--green-700: #14532d;
--green-500: #1f7a3d;
--green-50: #e4efe4;
/* สถานะ */
--amber: #f2a900;
--amber-50: #fdf1d3;
--red: #c93a3a;
--red-50: #fbe4e4;
/* โครงสร้าง — radius เล็ก, ห้าม shadow (§3) */
--radius: 8px;
--radius-sm: 4px;
--line-w: 1px;
/* ฟอนต์ — §4 */
--font-display: "Prompt", "Noto Sans Thai", sans-serif;
--font-body: "Noto Sans Thai", "Sarabun", sans-serif;
--font-mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
body {
margin: 0; background: var(--paper); color: var(--ink);
font-family: var(--font-body); line-height: 1.7;
}
a { color: var(--green-700); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
/* ---------- micro-label (§4) ---------- */
.label {
font-family: var(--font-body); font-size: .72rem; font-weight: 600;
letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
margin: 0 0 6px;
}
/* ---------- แถบนำทาง: พื้นดำ ตัวอักษรครีม (§5) ---------- */
.board-bar { background: var(--board); color: var(--paper); position: sticky; top: 0; z-index: 30; border-bottom: 3px solid var(--amber); }
.board-bar-in { max-width: 1120px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 12px; }
.board-bar img { width: 40px; height: 40px; border-radius: var(--radius-sm); }
.board-mark { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--paper); letter-spacing: .01em; }
.board-sub { display: block; font-size: .7rem; color: #9fb0a4; }
.board-bar .go { margin-left: auto; background: var(--amber); color: var(--ink); font-weight: 700;
padding: 9px 15px; border-radius: var(--radius-sm); text-decoration: none; font-size: .83rem; }
.board-bar .go:hover { background: #ffc233; }
/* ---------- hero: หัวเรื่องตรง ไม่มี gradient (DESIGN §2 ข้อ 2) ---------- */
.hero { background: var(--card); border-bottom: var(--line-w) solid var(--line); }
.hero .wrap { padding: 30px 24px 26px; }
.hero-tag { display: inline-block; background: var(--green-50); color: var(--green-700);
font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
padding: 5px 11px; border-radius: var(--radius-sm); }
h1 { font-family: var(--font-display); font-weight: 800; line-height: 1.18; margin: 12px 0 10px;
font-size: clamp(1.5rem, 4.2vw, 2.3rem); color: var(--ink); }
.hero-lead { margin: 0; color: var(--muted); max-width: 42rem; font-size: .96rem; }
/* ตารางสรุป — เส้นแบ่ง ไม่ใช่การ์ดมน (DESIGN §2 ข้อ 6) */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
margin: 20px 0 0; border-top: var(--line-w) solid var(--line); border-left: var(--line-w) solid var(--line); }
.fact { padding: 12px 14px; border-right: var(--line-w) solid var(--line); border-bottom: var(--line-w) solid var(--line); }
.fact b { display: block; font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem; color: var(--ink); margin-top: 3px; }
.fact b.status-on { color: var(--green-500); }
/* ---------- section ---------- */
main { padding: 26px 0 44px; }
section.block { margin-bottom: 30px; }
h2.sec { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; margin: 0 0 14px;
padding-bottom: 8px; display: flex; align-items: center; gap: 9px; }
h2.sec::after { content: ""; width: 24px; height: 3px; background: var(--green-700); margin-left: 2px; }
h2.sec .ic { width: 20px; height: 20px; color: var(--green-700); flex: none; }
/* ---------- ภาพสถานี ---------- */
figure.photo { margin: 0; border: var(--line-w) solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
figure.photo img { width: 100%; max-height: 400px; object-fit: cover; display: block; }
figure.photo figcaption { padding: 10px 13px; font-size: .82rem; color: var(--muted); border-top: var(--line-w) solid var(--line); }
/* ---------- สิ่งอำนวยความสะดวก: ตารางเส้นแบ่ง ไม่มีเงา ไม่มี emoji ---------- */
.amen { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0;
border-top: var(--line-w) solid var(--line); border-left: var(--line-w) solid var(--line); }
.amen > div { display: flex; align-items: center; gap: 11px; padding: 14px;
border-right: var(--line-w) solid var(--line); border-bottom: var(--line-w) solid var(--line); background: var(--card); }
.amen .ic { width: 20px; height: 20px; color: var(--green-700); flex: none; }
.amen b { display: block; font-size: .93rem; font-weight: 700; }
.amen small { display: block; color: var(--muted); font-size: .76rem; font-weight: 400; }
/* ---------- สายรถ: หัวการ์ด = กระดานดำ เลขสายอำพัน (§5) ---------- */
.route { border: var(--line-w) solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; background: var(--card); }
.route-head { background: var(--board); color: var(--paper); padding: 13px 16px; display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.route-no { font-family: var(--font-mono); font-weight: 700; font-size: 1.5rem; color: var(--amber);
line-height: 1; letter-spacing: .02em; min-width: 62px; }
.route-head h3 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; color: var(--paper); }
.route-flags { margin-left: auto; display: flex; gap: 7px; flex-wrap: wrap; }
.flag { font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-sm); }
.flag.on { background: var(--green-500); color: #fff; }
.flag.count { background: rgba(255,255,255,.14); color: var(--paper); }
.route-body { padding: 15px 16px; }
/* ป้ายเวลา = flip-board: พื้นดำ ตัวอักษรอำพัน mono (§5) */
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 7px; }
.t {
font-family: var(--font-mono); font-weight: 700; font-size: .93rem;
font-variant-numeric: tabular-nums; text-align: center;
background: var(--board); color: var(--amber);
padding: 8px 6px; border-radius: var(--radius-sm);
}
.t.past { background: var(--red-50); color: var(--red); }
.t.none { background: #eeeada; color: var(--muted); }
.note { margin: 13px 0 0; padding: 9px 12px; background: var(--amber-50); border-left: 3px solid var(--amber);
border-radius: var(--radius-sm); color: #6b5210; font-size: .83rem; display: flex; gap: 8px; align-items: flex-start; }
.note .ic { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.contact { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; padding-top: 13px; border-top: var(--line-w) solid var(--line); }
.contact a { display: inline-flex; align-items: center; gap: 6px; border: var(--line-w) solid var(--line);
border-radius: var(--radius-sm); padding: 7px 12px; font-size: .84rem; font-weight: 600;
color: var(--green-700); text-decoration: none; background: var(--card); }
.contact a:hover { border-color: var(--green-700); }
.contact .ic { width: 15px; height: 15px; }
/* ---------- การเดินทาง ---------- */
.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.way { display: flex; align-items: flex-start; gap: 10px; border: var(--line-w) solid var(--line);
border-radius: var(--radius); padding: 14px; background: var(--card); text-decoration: none; color: var(--ink); }
.way:hover { border-color: var(--green-700); }
.way .ic { width: 20px; height: 20px; color: var(--green-700); flex: none; margin-top: 2px; }
.way b { display: block; font-size: .93rem; font-weight: 700; }
.way small { display: block; color: var(--muted); font-size: .78rem; }
/* ---------- footer: พื้นดำ เขียนแบบกระดาน ---------- */
.board-foot { background: var(--board); color: #9fb0a4; padding: 24px 0; margin-top: 8px; font-size: .84rem; }
.board-foot a { color: var(--amber); text-decoration: none; }
.board-foot p { margin: 0 0 8px; }
@media (min-width: 768px) {
.wrap { padding: 0 32px; }
.hero .wrap { padding: 38px 32px 32px; }
}
</style>
</head>
<body>
<svg width="0" height="0" style="position:absolute" aria-hidden="true">
<symbol id="ic-image" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2" /> <circle cx="9" cy="9" r="2" /> <path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" /></symbol>
<symbol id="ic-check" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M20 6 9 17l-5-5" />
</symbol>
<symbol id="ic-banknote" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="12" x="2" y="6" rx="2" /> <circle cx="12" cy="12" r="2" /> <path d="M6 12h.01M18 12h.01" /></symbol>
<symbol id="ic-store" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5" /> <path d="M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244" /> <path d="M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05" /></symbol>
<symbol id="ic-utensils" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2" /> <path d="M7 2v20" /> <path d="M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7" /></symbol>
<symbol id="ic-coffee" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 2v2" /> <path d="M14 2v2" /> <path d="M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1" /> <path d="M6 2v2" /></symbol>
<symbol id="ic-accessibility" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="16" cy="4" r="1" /> <path d="m18 19 1-7-6 1" /> <path d="m5 8 3-3 5.5 3-2.36 3.5" /> <path d="M4.24 14.5a5 5 0 0 0 6.88 6" /> <path d="M13.76 17.5a5 5 0 0 0-6.88-6" /></symbol>
<symbol id="ic-map-pin" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0" />
<circle cx="12" cy="10" r="3" />
</symbol>
<symbol id="ic-bus" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M8 6v6" />
<path d="M15 6v6" />
<path d="M2 12h19.6" />
<path d="M18 18h3s.5-1.7.8-2.8c.1-.4.2-.8.2-1.2 0-.4-.1-.8-.2-1.2l-1.4-5C20.1 6.8 19.1 6 18 6H4a2 2 0 0 0-2 2v10h3" />
<circle cx="7" cy="18" r="2" />
<path d="M9 18h5" />
<circle cx="16" cy="18" r="2" />
</symbol>
<symbol id="ic-triangle-alert" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" />
<path d="M12 9v4" />
<path d="M12 17h.01" />
</symbol>
<symbol id="ic-phone" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384" />
</symbol>
<symbol id="ic-globe" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10" />
<path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" />
<path d="M2 12h20" />
</symbol>
<symbol id="ic-navigation" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="3 11 22 2 13 21 11 13 3 11" /></symbol>
<symbol id="ic-map" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z" />
<path d="M15 5.764v15" />
<path d="M9 3.236v15" />
</symbol>
<symbol id="ic-clock" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10" />
<path d="M12 6v6l4 2" />
</symbol>
</svg>
<header class="board-bar">
<div class="board-bar-in">
<img src="../../.image/icons/minibus-512x512.png" alt="Atroute" width="40" height="40">
<span>
<span class="board-mark">Atroute</span>
<span class="board-sub">สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</span>
</span>
<a class="go" href="../index.html#/stops/chatuchak_minibus_terminal">ดูตารางแบบเต็ม</a>
</div>
</header>
<section class="hero">
<div class="wrap">
<span class="hero-tag">สถานีต้นทาง · กรุงเทพมหานคร</span>
<h1>สถานีเดินรถโดยสารขนาดเล็ก (จตุจักร)<br>รถตู้ / มินิบัส</h1>
<p class="hero-lead">จุดขึ้นรถตู้และมินิบัสบริเวณจตุจักร — ทางไป<strong>จังหวัดอ่างทอง</strong> ที่สะดวกที่สุดจากฝั่งกรุงเทพฯ มีรถออกตลอดวันตั้งแต่เช้าถึงเย็น</p>
<div class="facts">
<div class="fact"><p class="label">สายไปอ่างทอง</p><b>2 สาย</b></div>
<div class="fact"><p class="label">เวลาออกรถ</p><b>06:00 – 18:00</b></div>
<div class="fact"><p class="label">เที่ยวรวม/วัน</p><b>33 เที่ยว</b></div>
<div class="fact"><p class="label">สถานะ</p><b class="status-on">เปิดให้บริการ</b></div>
</div>
</div>
</section>
<main>
<div class="wrap">
<!-- 1. ภาพสถานี -->
<section class="block">
<h2 class="sec"><svg class="ic" aria-hidden="true"><use href="#ic-image"/></svg> ภาพสถานี</h2>
<figure class="photo">
<img src="../../.image/stops/39321.jpg" alt="สถานีเดินรถโดยสารขนาดเล็ก (จตุจักร) รถตู้/มินิบัส — บริเวณจุดขึ้นรถตู้และมินิบัส">
<figcaption>สถานีเดินรถโดยสารขนาดเล็ก (จตุจักร) รถตู้/มินิบัส — บริเวณจุดขึ้นรถตู้และมินิบัส</figcaption>
</figure>
</section>
<!-- 2. สิ่งอำนวยความสะดวก -->
<section class="block">
<h2 class="sec"><svg class="ic" aria-hidden="true"><use href="#ic-check"/></svg> สิ่งอำนวยความสะดวก</h2>
<div class="amen">
<div><svg class="ic" aria-hidden="true"><use href="#ic-banknote"/></svg><span><b>ATM</b><small>ตู้กดเงินสดในบริเวณสถานี</small></span></div>
<div><svg class="ic" aria-hidden="true"><use href="#ic-store"/></svg><span><b>ร้านสะดวกซื้อ</b><small>เปิดตลอด 24 ชั่วโมง</small></span></div>
<div><svg class="ic" aria-hidden="true"><use href="#ic-utensils"/></svg><span><b>ศูนย์อาหาร</b><small>ร้านอาหารและเครื่องดื่ม</small></span></div>
<div><svg class="ic" aria-hidden="true"><use href="#ic-coffee"/></svg><span><b>ร้านกาแฟ</b><small>คาเฟ่ในสถานี</small></span></div>
<div><svg class="ic" aria-hidden="true"><use href="#ic-accessibility"/></svg><span><b>ทางลาด/พื้นที่นั่งรอ</b><small>อำนวยความสะดวกผู้โดยสาร</small></span></div>
<div><svg class="ic" aria-hidden="true"><use href="#ic-map-pin"/></svg><span><b>จุดซื้อตั๋ว</b><small>เคาน์เตอร์ของแต่ละสาย</small></span></div>
</div>
</section>
<!-- 3. สายรถไปอ่างทอง -->
<section class="block">
<h2 class="sec"><svg class="ic" aria-hidden="true"><use href="#ic-bus"/></svg> สายรถไปอ่างทอง — ตารางเวลาทั้งวัน</h2>
<article class="route">
<div class="route-head">
<span class="route-no">15</span>
<h3>กรุงเทพ-อ่างทอง สายใน</h3>
<span class="route-flags"><span class="flag on">มีรอบ</span><span class="flag count">8 เที่ยว/วัน</span></span>
</div>
<div class="route-body">
<p class="label">เวลาออกรถจากสถานี</p>
<div class="times">
<span class="t">06:00</span><span class="t">08:30</span><span class="t">09:15</span><span class="t">10:00</span><span class="t">12:30</span><span class="t">14:00</span><span class="t">15:00</span><span class="t">16:00</span>
</div>
<p class="note"><svg class="ic" aria-hidden="true"><use href="#ic-triangle-alert"/></svg> <span>เวลารถเปลี่ยนทุกวัน — โปรดโทรสอบถามผู้ประกอบการก่อนเดินทาง</span></p>
<div class="contact">
<a href="tel:+66932495788"><svg class="ic" aria-hidden="true"><use href="#ic-phone"/></svg> 093 249 5788</a>
<a href="https://www.facebook.com/groups/1355821444815052" target="_blank" rel="noopener"><svg class="ic" aria-hidden="true"><use href="#ic-globe"/></svg> Facebook ของสาย</a>
</div>
</div>
</article>
<article class="route">
<div class="route-head">
<span class="route-no">902</span>
<h3>กรุงเทพ-อ่างทอง สายเอเซีย</h3>
<span class="route-flags"><span class="flag on">มีรอบ</span><span class="flag count">25 เที่ยว/วัน</span></span>
</div>
<div class="route-body">
<p class="label">เวลาออกรถจากสถานี</p>
<div class="times">
<span class="t">06:00</span><span class="t">06:30</span><span class="t">07:00</span><span class="t">07:30</span><span class="t">08:00</span><span class="t">08:30</span><span class="t">09:00</span><span class="t">09:30</span><span class="t">10:00</span><span class="t">10:30</span><span class="t">11:00</span><span class="t">11:30</span><span class="t">12:00</span><span class="t">12:30</span><span class="t">13:00</span><span class="t">13:30</span><span class="t">14:00</span><span class="t">14:30</span><span class="t">15:00</span><span class="t">15:30</span><span class="t">16:00</span><span class="t">16:30</span><span class="t">17:00</span><span class="t">17:30</span><span class="t">18:00</span>
</div>
<div class="contact">
<a href="tel:+66843377376"><svg class="ic" aria-hidden="true"><use href="#ic-phone"/></svg> 084 337 7376</a>
<a href="tel:+66623815828"><svg class="ic" aria-hidden="true"><use href="#ic-phone"/></svg> 066 238 1582</a>
<a href="https://www.facebook.com/profile.php?id=100063523693753" target="_blank" rel="noopener"><svg class="ic" aria-hidden="true"><use href="#ic-globe"/></svg> Facebook ของสาย</a>
</div>
</div>
</article>
<p style="margin:14px 0 0;color:var(--muted);font-size:.86rem">
ตารางนี้เป็นเวลาออกรถ ณ สถานีจตุจักร · ดูตารางจุดจอดทุกป้ายได้ที่ <a href="../index.html#/check">หน้าเช็กเวลาเดินรถ</a>
</p>
</section>
<!-- 4. การเดินทางมาสถานี -->
<section class="block">
<h2 class="sec"><svg class="ic" aria-hidden="true"><use href="#ic-navigation"/></svg> การเดินทางมาสถานี</h2>
<div class="ways">
<a class="way" href="../index.html#/stops/chatuchak_minibus_terminal">
<svg class="ic" aria-hidden="true"><use href="#ic-map"/></svg>
<span><b>ดูแผนที่ในเว็บ Atroute</b><small>แผนที่เครือข่ายป้ายและจุดจอด</small></span>
</a>
<a class="way" href="https://www.google.com/maps/search/?api=1&amp;query=สถานีเดินรถโดยสารขนาดเล็ก+จตุจักร" target="_blank" rel="noopener">
<svg class="ic" aria-hidden="true"><use href="#ic-map-pin"/></svg>
<span><b>เปิดใน Google Maps</b><small>นำทางด้วย Google Maps</small></span>
</a>
<a class="way" href="../index.html#/check">
<svg class="ic" aria-hidden="true"><use href="#ic-clock"/></svg>
<span><b>เช็กเวลาเดินรถ</b><small>ตารางทุกจุดจอดในหน้าเดียว</small></span>
</a>
</div>
</section>
</div>
</main>
<footer class="board-foot">
<div class="wrap">
<p>© 2026 Atroute — ข้อมูลรวบรวมจากผู้ประกอบการแต่ละสาย เวลาอาจเปลี่ยนแปลงได้ โปรดตรวจสอบกับผู้ประกอบการก่อนเดินทาง</p>
<p><a href="../index.html#/">กลับหน้าแรก Atroute</a> · <a href="mailto:[email protected]">[email protected]</a></p>
</div>
</footer>
</body>
</html>
+6 -2
View File
@@ -1,5 +1,5 @@
/* ============================================================ /* ============================================================
AT Transit — Service Worker Atroute — Service Worker
กลไกอัปเดตอัตโนมัติ: ผู้ใช้ไม่ต้องล้างแคชเอง กลไกอัปเดตอัตโนมัติ: ผู้ใช้ไม่ต้องล้างแคชเอง
------------------------------------------------------------ ------------------------------------------------------------
หลักการ: หลักการ:
@@ -13,7 +13,7 @@
- ขั้นตอนอัปเดต: ดู AGENTS.md หัวข้อ PWA - ขั้นตอนอัปเดต: ดู AGENTS.md หัวข้อ PWA
============================================================ */ ============================================================ */
const VERSION = "2026.09.12.1"; // ← bump ทุกครั้งที่แก้ SW เอง const VERSION = "2026.09.12.3"; // ← bump ทุกครั้งที่แก้ SW เอง
const CACHE = `at-transit-${VERSION}`; const CACHE = `at-transit-${VERSION}`;
const PRECACHE = [ const PRECACHE = [
@@ -37,6 +37,10 @@ const PRECACHE = [
"./partials/checkSchedule.html", "./partials/checkSchedule.html",
"./partials/stopDetail.html", "./partials/stopDetail.html",
"./partials/credits.html", "./partials/credits.html",
"./partials/about.html",
"./partials/about.init.js",
"./partials/blog.html",
"./partials/blog.init.js",
"./partials/icons-sprite.svg", "./partials/icons-sprite.svg",
"../.image/icons/minibus-512x512.png", "../.image/icons/minibus-512x512.png",
]; ];