พอร์ต UI จาก web-at-transit-mock เข้า Next.js + data sync เข้า Postgres/SeaweedFS
- 8 หน้า (home/stops/routes/stop/check/blog/about/credits) แปลง partials → React component ตรง mock
- ตรรกะพอร์ตเป็น src/lib/ui/*.ts (mount()) + runtime/PageRuntime
- CSS: base + pages/*.css import ต่อ route (คงลำดับ cascade ของ mock)
- asset/content: public/{image,resource/data,content,locales,vendor}
- แก้ path รูปไทล์พาร์ทเนอร์ (.image → /image) + fallback absolute
- ลบ UI เดิมที่ไม่ตรง mock (expanded/stops details/old components/globals.css)
- script/sync_data_to_postgres.mjs + sync_images_to_storage.mjs (dry-run/--apply, backup)
- docs/UI-PORT.md + DESIGN.md + README
This commit is contained in:
1 parent
24187fc3b7
commit
138a3d15d8
300 files changed
+20213
-1978
No files matched your search
@@ -0,0 +1,30 @@
|
||||
/* Ported from web-at-transit-mock/ui/partials/about.html — markup 1:1 with the mock. */
|
||||
import "@/styles/pages/about.css";
|
||||
export default function AboutView() {
|
||||
return (
|
||||
<>
|
||||
|
||||
{/* ============ HERO (ภาษาเดียวกับหน้าแรก) ============ */}
|
||||
<section className="mu-hero">
|
||||
<img className="mu-hero-map" src="/image/network/overview-map.png" alt="" aria-hidden="true" decoding="async" />
|
||||
<div className="mu-blob one" />
|
||||
<div className="mu-blob two" />
|
||||
<div className="mu-blob three" />
|
||||
<div className="mu-container mu-hero-content">
|
||||
<span className="mu-badge"><svg className="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 className="mu-gradient-text" data-i18n="about.brand">เมื่อไหร่รถจะมา</span></h1>
|
||||
<p className="mu-hero-lead" data-i18n="about.lead">เรื่องราวและที่มาของเว็บนี้ — อ่านเรียงตามบล็อกด้านล่างได้เลย</p>
|
||||
</div>
|
||||
</section>
|
||||
{/* ============ เนื้อหา (โหลดจาก about-data: text1.json + pic1, text2.json + pic2 ...) ============ */}
|
||||
<section className="mu-about-wrap">
|
||||
<div className="mu-container">
|
||||
<div id="about-blocks" aria-live="polite">
|
||||
<div className="mu-about-skeleton"><div className="mu-about-skel-card" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/* Ported from web-at-transit-mock/ui/partials/blog.html — markup 1:1 with the mock. */
|
||||
import "@/styles/pages/blog.css";
|
||||
export default function BlogView() {
|
||||
return (
|
||||
<>
|
||||
|
||||
{/* ============ HERO ============ */}
|
||||
<section className="mu-hero">
|
||||
<img className="mu-hero-map" src="/image/network/overview-map.png" alt="" aria-hidden="true" decoding="async" />
|
||||
<div className="mu-blob one" />
|
||||
<div className="mu-blob two" />
|
||||
<div className="mu-blob three" />
|
||||
<div className="mu-container mu-hero-content">
|
||||
<span className="mu-badge"><svg className="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 className="mu-gradient-text" data-i18n="blog.subtitle">หน้านี้ก็เหมือนไดอารี่ของเรา อยากบ่นอะไรก็บ่น</span></h1>
|
||||
<p className="mu-hero-lead" data-i18n="blog.lead">ขอบคุณที่เข้ามาอ่านบางบทความก็มีสาระบางบทความก็ไม่มีสาระ </p>
|
||||
</div>
|
||||
</section>
|
||||
{/* ============ รายการบทความ (โหลดจาก blog-data: text1.json + pic1, ...) ============ */}
|
||||
<section className="mu-blog-wrap">
|
||||
<div className="mu-container">
|
||||
<div className="mu-blog-bar" id="blog-bar" hidden>
|
||||
<p className="mu-blog-count" id="blog-count" />
|
||||
<div className="mu-view-switch" role="group" aria-label="มุมมอง">
|
||||
<button type="button" className="mu-view-btn" data-view="grid">
|
||||
<svg className="ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="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" className="mu-view-btn" data-view="list">
|
||||
<svg className="ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="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 className="mu-blog-skel" />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/* Ported from web-at-transit-mock/ui/partials/checkSchedule.html — markup 1:1 with the mock. */
|
||||
import "@/styles/pages/check.css";
|
||||
export default function CheckView() {
|
||||
return (
|
||||
<>
|
||||
|
||||
{/* ============ HERO (ภาษาเดียวกับหน้าแรก) ============ */}
|
||||
<section className="mu-hero">
|
||||
<img className="mu-hero-map" src="/image/network/overview-map.png" alt="" aria-hidden="true" fetchPriority="high" decoding="async" />
|
||||
<div className="mu-blob one" />
|
||||
<div className="mu-blob two" />
|
||||
<div className="mu-blob three" />
|
||||
<div className="mu-container mu-hero-content">
|
||||
<span className="mu-badge"><svg className="ic" aria-hidden="true"><use href="#ic-clock" /></svg> <span data-i18n="cta.check">เช็กเวลาเดินรถ</span></span>
|
||||
<h1><span data-i18n="check.title">ตารางเวลาเดินรถ</span><br /><span className="mu-gradient-text" id="check-hero-route" /></h1>
|
||||
<p className="mu-hero-lead" data-i18n="check.lead">เลือกสายรถ แล้วดูรอบรถทุกจุดจอดในหน้าเดียว</p>
|
||||
<div className="mu-route-selector single">
|
||||
<div className="mu-select-field">
|
||||
<label htmlFor="check-route-select">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><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} /></svg>
|
||||
<span data-i18n="route.selectRoute">เลือกสายรถ</span>
|
||||
</label>
|
||||
<div className="mu-select-box">
|
||||
<svg className="mu-select-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><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} /></svg>
|
||||
<select id="check-route-select" data-i18n-attr="aria-label:route.selectRoute" />
|
||||
<svg className="mu-select-chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6" /></svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{/* ============ สรุปเส้นทาง (สถิติแบบ index) ============ */}
|
||||
<section className="mu-summary" aria-label="สรุปเส้นทาง">
|
||||
<div className="mu-container">
|
||||
<div className="mu-summary-grid">
|
||||
<div className="mu-stat tag-purple"><h3 id="check-stat-stops">–</h3><p data-i18n="check.kpiStops">จุดจอดหลัก</p></div>
|
||||
<div className="mu-stat tag-sky"><h3 id="check-stat-provinces">–</h3><p data-i18n="check.kpiProvince">จังหวัดที่ผ่าน</p></div>
|
||||
<div className="mu-stat tag-mint"><h3 id="check-stat-trips">–</h3><p data-i18n="check.kpiTrips">รอบต่อวัน</p></div>
|
||||
<div className="mu-stat tag-pink"><h3 id="check-stat-next">–</h3><p data-i18n="check.kpiNext">รอบถัดไป</p></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{/* ============ ตารางเวลาเดินรถ ============ */}
|
||||
<section className="mu-schedule" aria-label="ตารางเวลาเดินรถ">
|
||||
<div className="mu-container">
|
||||
<div className="mu-zone">
|
||||
<div className="mu-zone-head">
|
||||
<span className="mu-zone-tag tag-purple" data-i18n="check.scheduleAll">ตารางเวลาเดินรถทุกจุดจอด</span>
|
||||
<p className="mu-zone-desc mu-zone-meta" id="check-zone-desc" />
|
||||
<p className="mu-zone-desc mu-zone-meta mu-zone-now" id="check-now-line" />
|
||||
<p className="mu-zone-desc mu-zone-updated" id="check-updated-line" />
|
||||
</div>
|
||||
{/* การ์ดจุดจอด + ชิปเวลา: สร้างจาก resource/data/schedules.json (checkSchedule.init.js) */}
|
||||
<ul className="mu-schedule-list" id="check-schedule-list" />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/* Ported from web-at-transit-mock/ui/partials/credits.html — markup 1:1 with the mock. */
|
||||
import "@/styles/pages/credits.css";
|
||||
export default function CreditsView() {
|
||||
return (
|
||||
<>
|
||||
<main className="mu-page">
|
||||
<div className="mu-credit-wrap">
|
||||
<div className="mu-credit-hero">
|
||||
<p className="mu-breadcrumb"><a href="/">หน้าแรก</a>/ เครดิต</p>
|
||||
<h1><span data-i18n="credits.title">เครดิตและแหล่งที่มา</span></h1>
|
||||
<p>รายการทรัพยากรทั้งหมดที่ใช้ในเว็บนี้ พร้อมใบอนุญาต (license) ตามข้อกำหนดของเจ้าของแต่ละราย</p>
|
||||
</div>
|
||||
<section className="mu-credit-section">
|
||||
<h2><span data-i18n="credits.icons">ไอคอน — Lucide</span></h2>
|
||||
<p className="src">แหล่งที่มา: <a href="https://lucide.dev" rel="noopener">lucide.dev</a> · ใบอนุญาต: <a href="https://github.com/lucide-icons/lucide/blob/main/LICENSE" rel="noopener">MIT License</a> — ใช้ได้ฟรีทั้งส่วนบุคคลและเชิงพาณิชย์ โดยไม่ต้องระบุเครดิต แต่เราระบุไว้เพื่อความโปร่งใส</p>
|
||||
<ul>
|
||||
<li>ไอคอนที่ใช้ทั้งหมด 15 รายการ เก็บที่ <code>/image/icons/lucide/</code></li>
|
||||
<li>alarm-clock, arrow-right, bus, bus-front, check, clock, globe, hourglass, map, map-pin, message-circle, phone, refresh-cw, search, triangle-alert</li>
|
||||
<li>วิธีใช้งาน: sprite <code>src/components/IconSprite.tsx</code> + <code><svg class="ic"><use href="#ic-ชื่อ"></code></li>
|
||||
</ul>
|
||||
<div className="mu-license">
|
||||
<strong>MIT License (สรุป):</strong> อนุญาตให้ใช้ คัดลอก แก้ไข ผสาน เผยแพร่ แจกจ่าย ขาย และ/หรือให้สิทธิ์ใช้งานซอฟต์แวร์นี้ โดยมีเงื่อนไขให้ข้อความแสดงลิขสิทธิ์และข้อความอนุญาตข้างต้นปรากฏอยู่ในสำเนาทั้งหมดหรือส่วนสำคัญของซอฟต์แวร์ ซอฟต์แวร์นี้ให้บริการ "ตามสภาพ" โดยไม่มีการรับประกันใด ๆ
|
||||
</div>
|
||||
</section>
|
||||
<section className="mu-credit-section">
|
||||
<h2><span data-i18n="credits.fonts">ฟอนต์ — Google Fonts</span></h2>
|
||||
<p className="src">แหล่งที่มา: <a href="https://fonts.google.com" rel="noopener">fonts.google.com</a> · ใบอนุญาต: <a href="https://openfontlicense.org" rel="noopener">SIL Open Font License 1.1</a></p>
|
||||
<ul>
|
||||
<li><strong>K2D</strong> — ฟอนต์หลักของเว็บ (เนื้อหา + หัวเรื่อง) · มีหัวแบบไทย น้ำหนัก 300–800</li>
|
||||
<li><strong>Noto Sans Thai</strong> — ตัวสำรองเนื้อหา (โหลดผ่าน Google Fonts CDN)</li>
|
||||
<li><strong>Prompt</strong> — ตัวสำรองหัวเรื่อง/ตัวหนา</li>
|
||||
<li><strong>IBM Plex Mono</strong> — เวลา · เลขสาย · ตัวเลข (เรียงตรงกัน)</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section className="mu-credit-section">
|
||||
<h2><span data-i18n="credits.map">แผนที่</span></h2>
|
||||
<p className="src">ใบอนุญาต: Leaflet <a href="https://github.com/Leaflet/Leaflet/blob/main/LICENSE" rel="noopener">BSD-2-Clause</a> · ชุดแผนที่ (tiles): <a href="https://www.openstreetmap.org/copyright" rel="noopener">OpenStreetMap © ผู้มีส่วนร่วม (ODbL)</a></p>
|
||||
<ul>
|
||||
<li>Leaflet — ไลบรารีแผนที่แบบ open-source</li>
|
||||
<li>OpenStreetMap — ภาพ tiles และข้อมูลแผนที่ที่ใช้แสดงผล</li>
|
||||
<li>เส้นทางเดินรถ จุดจอด และหมุดสถานี วาดจากข้อมูล GIS ของทีม (<code>GeoJSON</code>) ทับบนแผนที่</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section className="mu-credit-section">
|
||||
<h2><span data-i18n="credits.photos">ขอขอบคุณภาพรถประจำทาง</span></h2>
|
||||
<p className="src">ภาพรถโดยสารประจำทางที่แสดงในหน้ารายละเอียดสาย มาจากแหล่งข้อมูลสาธารณะด้านล่างนี้ — ขอบคุณเจ้าของภาพและผู้รวบรวมทุกท่าน</p>
|
||||
<ul>
|
||||
<li><strong>สาย 2194</strong> หัวเวียง-อยุธยา — จาก <a href="http://www.bangkokbusclub.com/cms/showthread.php?t=4968" rel="noopener">bangkokbusclub.com</a></li>
|
||||
<li><strong>สาย 8</strong> กรุงเทพ-สรรคบุรี-ชัยนาท — จาก <a href="https://web.facebook.com/groups/431811197419587/posts/2006978336569524/" rel="noopener">กลุ่ม Facebook (web.facebook.com)</a></li>
|
||||
<li><strong>สาย 954</strong> กรุงเทพ-ท่าช้าง — จาก <a href="https://gogo.town/route/bangkok-rangsit-angthong-thachang/" rel="noopener">gogo.town</a></li>
|
||||
<li><strong>รถไฟฟ้าสายสีแดง </strong> กรุงเทพ-ชุมทางบ้านภาชี — จาก <a href="https://thelist.group/realist/blog/%E0%B8%A3%E0%B8%96%E0%B9%84%E0%B8%9F%E0%B8%9F%E0%B9%89%E0%B8%B2%E0%B8%AA%E0%B8%B2%E0%B8%A2%E0%B8%AA%E0%B8%B5%E0%B9%81%E0%B8%94%E0%B8%87/" rel="noopener">thelist.group</a></li>
|
||||
</ul>
|
||||
<p className="mu-license">
|
||||
<span data-i18n="credits.photosNote">และสายอื่น ๆ ที่ไม่ได้ระบุ ขอขอบคุณมา ณ ที่นี้</span>
|
||||
</p>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
/* Ported from web-at-transit-mock/ui/partials/home.html — markup 1:1 with the mock. */
|
||||
import "@/styles/pages/home.css";
|
||||
export default function HomeView() {
|
||||
return (
|
||||
<>
|
||||
|
||||
<section className="mu-hero">
|
||||
<img className="mu-hero-map" src="/image/network/overview-map.png" alt="" aria-hidden="true" fetchPriority="high" decoding="async" />
|
||||
<div className="mu-blob one" />
|
||||
<div className="mu-blob two" />
|
||||
<div className="mu-blob three" />
|
||||
<div className="mu-container mu-hero-content">
|
||||
<span className="mu-badge" data-i18n="home.welcome">ยินดีต้อนรับ</span>
|
||||
<h1><span data-i18n="home.title1">สถานีขนส่งผู้โดยสารภายใน</span><br /><span className="mu-gradient-text" id="hero-province">จังหวัดอ่างทอง</span></h1>
|
||||
<div className="mu-route-selector">
|
||||
<div className="mu-select-field">
|
||||
<label htmlFor="province-select">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><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} /></svg>
|
||||
<span data-i18n="home.chooseProvince">เลือกจังหวัด</span>
|
||||
</label>
|
||||
<div className="mu-select-box">
|
||||
<svg className="mu-select-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><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} /></svg>
|
||||
<select id="province-select" data-i18n-attr="aria-label:home.chooseProvince" />
|
||||
<svg className="mu-select-chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6" /></svg>
|
||||
</div>
|
||||
</div>
|
||||
<span className="mu-select-arrow" aria-hidden="true"><svg className="ic"><use href="#ic-arrow-right" /></svg></span>
|
||||
<div className="mu-select-field">
|
||||
<label htmlFor="station-select">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><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} /></svg>
|
||||
<span data-i18n="home.chooseStation">สถานีขนส่งผู้โดยสาร</span>
|
||||
</label>
|
||||
<div className="mu-select-box">
|
||||
<svg className="mu-select-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><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} /></svg>
|
||||
<select id="station-select" data-i18n-attr="aria-label:home.chooseStation" />
|
||||
<svg className="mu-select-chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6" /></svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p className="mu-select-hint" id="station-hint" aria-live="polite" />
|
||||
</div>
|
||||
</section>
|
||||
<section className="mu-sponsor-marquee" aria-label="ผู้สนับสนุนและพาร์ทเนอร์">
|
||||
<div className="mu-sponsor-head">
|
||||
<h4 data-i18n="footer.sponsors">ผู้สนับสนุน & พาร์ทเนอร์</h4>
|
||||
<p className="lead" data-i18n="footer.sponsorsLead">ร่วมเป็นผู้สนับสนุนเราได้ เมื่อซื้อของออนไลน์ หรือซื้อตั๋วรถทัวร์ เครื่องบิน ออนไลน์กดเลือกสินค้า หรือบริการผ่านลิงค์นายหน้าของเราไม่มีค่าใช้จ่ายเพิ่ม</p>
|
||||
</div>
|
||||
<div className="mu-marquee">
|
||||
<div className="mu-marquee-track">
|
||||
<a className="mu-marquee-tile" href="#" aria-label="7-Eleven"><img src="/image/partners/7-11.png" alt="7-Eleven" decoding="async" /></a>
|
||||
<a className="mu-marquee-tile" href="#" aria-label="Shopee"><img src="/image/partners/shopee.png" alt="Shopee" decoding="async" /></a>
|
||||
<a className="mu-marquee-tile" href="#" aria-label="Lazada"><img src="/image/partners/lazada.png" alt="Lazada" decoding="async" /></a>
|
||||
<a className="mu-marquee-tile" href="#" aria-label="airasia MOVE"><img src="/image/partners/airasia-move.png" alt="airasia MOVE" decoding="async" /></a>
|
||||
<a className="mu-marquee-tile" href="#" aria-label="busonlineticket"><img src="/image/partners/busonlineticket.png" alt="busonlineticket" decoding="async" /></a>
|
||||
<a className="mu-marquee-tile" href="#" aria-label="Trip.com"><img src="/image/partners/trip.jpg" alt="Trip.com" decoding="async" /></a>
|
||||
<a className="mu-marquee-tile" href="#" aria-label="truck2hand"><img src="/image/partners/truck2hand.png" alt="truck2hand" decoding="async" /></a>
|
||||
<a className="mu-marquee-tile" href="#" aria-label="ทีซีแอล 999 อ่างทอง"><img src="/image/partners/tcl999-angthong.jpg" alt="ทีซีแอล 999 อ่างทอง" decoding="async" /></a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<main className="mu-main">
|
||||
<div className="mu-container">
|
||||
{/* คำอธิบายสีการ์ดตามหมวดเส้นทาง */}
|
||||
<section className="mu-legend" aria-label="คำอธิบายสีการ์ดตามหมวดเส้นทาง">
|
||||
<h2 className="mu-legend-title" data-i18n="legend.title">คำอธิบายสีการ์ดตามหมวดเส้นทาง</h2>
|
||||
<ul className="mu-legend-list">
|
||||
<li><span className="sw sw-bangkok" aria-hidden="true" /><span data-i18n="legend.bangkok">หมวดเส้นทางเข้ากรุงเทพฯ — การ์ดสีน้ำเงิน</span></li>
|
||||
<li><span className="sw sw-interprov" aria-hidden="true" /><span data-i18n="legend.interprov">หมวดเส้นทางระหว่างจังหวัด — การ์ดสีม่วง</span></li>
|
||||
<li><span className="sw sw-inprov" aria-hidden="true" /><span data-i18n="legend.inprov">หมวดเส้นทางภายในจังหวัด — การ์ดสีชมพู</span></li>
|
||||
<li><span className="sw sw-municipal" aria-hidden="true" /><span data-i18n="legend.municipal">หมวดเส้นทางภายในเทศบาล — การ์ดสีเหลืองอ่อน</span></li>
|
||||
<li><span className="sw sw-empty" aria-hidden="true" /><span data-i18n="legend.empty">ยังไม่มีข้อมูล — การ์ดสีเทา แสดง N/A แทนเลขสาย</span></li>
|
||||
</ul>
|
||||
<p className="mu-legend-note" data-i18n="legend.note">อ่างทองยังไม่มีรถหมวด 1 (เส้นทางภายในเทศบาล) จึงแสดงการ์ดสีเทาและใช้ N/A แทนตัวเลขสายเส้นทาง</p>
|
||||
</section>
|
||||
{/* หมวดเส้นทางทั้งหมด: สร้างจาก resource/data/route_groups.json + routes.json (+ routes_municipal.json)
|
||||
ที่มา: ui/partials/home.init.js → initRouteZones() — ห้าม hardcode การ์ดในไฟล์นี้ */}
|
||||
<div id="route-zones" />
|
||||
{/* ปุ่มแชร์ลิงก์สั้น (มุมล่างขวา ต่อจากการ์ดหมวดเส้นทางภายในจังหวัด) */}
|
||||
<div className="mu-share-row">
|
||||
<button type="button" className="mu-share-btn" id="share-btn">
|
||||
<svg className="ic" aria-hidden="true"><use href="#ic-share-2" /></svg>
|
||||
<span data-i18n="share.label">แชร์ลิงก์สั้น</span>
|
||||
</button>
|
||||
<p className="mu-share-status" id="share-status" aria-live="polite" />
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
/* Ported from web-at-transit-mock/ui/partials/busDetail.html — markup 1:1 with the mock. */
|
||||
import "@/styles/pages/route.css";
|
||||
export default function RouteView() {
|
||||
return (
|
||||
<>
|
||||
<main className="mu-page">
|
||||
<div className="mu-container">
|
||||
<p className="mu-breadcrumb"><a href="/">หน้าแรก</a>/ <span data-i18n="nav.routes">รายละเอียดสายรถ</span></p>
|
||||
<h1 className="mu-page-title"><span className="mu-route-chip" id="route-chip" /> <span id="route-title" /></h1>
|
||||
{/* ตัวเลือกสายรถ: เติมจาก resource/data/routes.json (busDetail.init.js) */}
|
||||
<form className="mu-toolbar" data-prevent-submit="1">
|
||||
<select aria-label="เลือกสายรถ" id="route-select" />
|
||||
</form>
|
||||
{/* ============ รถประจำสาย + ติดต่อผู้ประกอบการ (การ์ดเดียว) ============ */}
|
||||
{/* รูปรถ/คำอธิบาย/QR/เบอร์โทร: เติมจาก resource/data/captions/caption<รหัสสาย>.json + routes.json */}
|
||||
<section className="mu-vehicle-card" aria-label="รถประจำสายและติดต่อผู้ประกอบการ" id="route-vehicle-card">
|
||||
<img id="route-vehicle-img" alt="" loading="lazy" decoding="async" hidden />
|
||||
<div className="meta">
|
||||
<p className="label" data-i18n="route.vehicle">รถประจำสาย</p>
|
||||
<h2 id="route-vehicle-title" hidden />
|
||||
<p id="route-vehicle-desc" hidden />
|
||||
</div>
|
||||
<div className="mu-vehicle-contact" id="route-contact" />
|
||||
</section>
|
||||
{/* ============ สรุปเส้นทาง ============ */}
|
||||
<section className="mu-summary" aria-label="สรุปเส้นทาง">
|
||||
<div className="mu-container">
|
||||
<div className="mu-summary-grid">
|
||||
<div className="mu-stat tag-purple"><h3 id="stat-stops">–</h3><p>จุดจอดหลัก</p></div>
|
||||
<div className="mu-stat tag-sky"><h3 id="stat-provinces">–</h3><p>จังหวัดที่ผ่าน</p></div>
|
||||
<div className="mu-stat tag-mint"><h3 id="stat-trips">–</h3><p>รอบต่อวัน</p></div>
|
||||
<div className="mu-stat tag-pink"><h3 id="stat-next">–</h3><p>รอบถัดไป</p></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{/* ============ แผนที่เส้นทาง (Leaflet + GeoJSON จาก QGIS) ============ */}
|
||||
<section className="mu-zone" aria-label="แผนที่เส้นทาง">
|
||||
<div className="mu-zone-head">
|
||||
<span className="mu-zone-tag tag-sky" data-i18n="route.mapTitle">เส้นทางเดินรถ</span>
|
||||
<p className="mu-zone-desc" data-i18n="route.mapDesc">เส้นทางจริงจากข้อมูล GIS · ป้ายหยุดรถตามเส้นทาง</p>
|
||||
</div>
|
||||
<div className="mu-map-card">
|
||||
<div className="at-map" id="route-map" role="region" aria-label="แผนที่เส้นทางเดินรถ" />
|
||||
<p className="at-map-caption" id="route-map-caption" />
|
||||
<div className="at-km-wrap" hidden>
|
||||
<h3><span data-i18n="map.alongRoute">จุดจอดตามเส้นทาง (กม. จากต้นทาง)</span></h3>
|
||||
<ul id="route-map-list" />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
/* Ported from web-at-transit-mock/ui/partials/stopDetail.html — markup 1:1 with the mock. */
|
||||
import "@/styles/pages/stop.css";
|
||||
export default function StopView() {
|
||||
return (
|
||||
<>
|
||||
<main className="mu-page">
|
||||
<div className="mu-container">
|
||||
<p className="mu-breadcrumb" id="stop-breadcrumb" />
|
||||
<section className="mu-stop-hero">
|
||||
<div>
|
||||
<h1 className="mu-stop-hero-title"><svg className="ic" aria-hidden="true"><use href="#ic-map-pin" /></svg> <span id="stop-title" /></h1>
|
||||
<p className="mu-stop-hero-sub" id="stop-sub" />
|
||||
<div className="mu-meta-row" id="stop-meta" />
|
||||
<div className="mu-hero-metric-grid" id="stop-metrics" />
|
||||
</div>
|
||||
<div>
|
||||
<img className="mu-stop-hero-photo" id="stop-photo" alt="" fetchPriority="high" decoding="async" hidden />
|
||||
<div className="mu-live-clock-card" id="mu-live-clock-card">
|
||||
<div>
|
||||
<p className="mu-live-clock-title" data-i18n="stop.nowAtStop">เวลาปัจจุบัน ณ ป้ายนี้</p>
|
||||
<p className="mu-live-clock-time" id="mu-current-time">--:--</p>
|
||||
</div>
|
||||
<p className="mu-live-clock-note"><span className="mu-live-dot" /><span data-i18n="stop.autoNext">กำลังคำนวณเที่ยวถัดไปอัตโนมัติ</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section className="mu-nearby" id="stop-nearby" aria-label="สถานที่ใกล้เคียง" hidden>
|
||||
<h2><span data-i18n="stop.nearby">ใกล้เคียงป้าย</span></h2>
|
||||
<p className="sub" id="stop-nearby-sub" />
|
||||
<div className="mu-nearby-grid" id="stop-nearby-grid" />
|
||||
</section>
|
||||
<div className="mu-toolbar" id="stop-toolbar" />
|
||||
<section className="mu-info-grid" id="stop-info" aria-label="stop highlights" />
|
||||
<section className="mu-layout-grid">
|
||||
<div className="mu-card-panel">
|
||||
<h2><span data-i18n="stop.routes">สายรถที่ผ่านจุดนี้</span></h2>
|
||||
<div className="mu-route-tools">
|
||||
<input id="mu-route-filter" className="mu-route-filter" type="text" placeholder="ค้นหาสายรถหรือปลายทาง" data-i18n-attr="placeholder:stop.searchRoute,aria-label:stop.searchRoute" />
|
||||
<span className="mu-route-count" id="mu-route-count" />
|
||||
</div>
|
||||
<ul className="mu-list mu-stop-list" id="stop-routes" />
|
||||
</div>
|
||||
<aside className="mu-card-panel">
|
||||
<h2><span data-i18n="stop.mapInfo">แผนที่และข้อมูลป้าย</span></h2>
|
||||
<div className="at-map" id="stop-map" role="region" aria-label="แผนที่เส้นทางที่ผ่านป้ายนี้" />
|
||||
<p className="at-map-caption" id="stop-map-caption" />
|
||||
<div id="stop-chips" style={{display: 'flex', flexWrap: 'wrap', gap: 8, marginTop: 14}} />
|
||||
</aside>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
/* Ported from web-at-transit-mock/ui/partials/busStop.html — markup 1:1 with the mock. */
|
||||
import "@/styles/pages/stops.css";
|
||||
export default function StopsView() {
|
||||
return (
|
||||
<>
|
||||
<main className="mu-page">
|
||||
<div className="mu-container">
|
||||
<p className="mu-breadcrumb"><a href="/" data-i18n="nav.home">หน้าแรก</a>/ <span data-i18n="nav.stops">ป้ายหยุดรถ</span></p>
|
||||
<section className="mu-hero-panel">
|
||||
<div>
|
||||
<h1 className="mu-hero-title"><span data-i18n="stops.title">ค้นหาป้ายหยุดรถแบบรวดเร็ว</span></h1>
|
||||
<p className="mu-hero-subtitle"><span data-i18n="stops.subtitle">ค้นหาด้วยรหัสหลักกิโลเมตรของป้าย หรือค้นหาด้วยชื่อสถานที่สำคัญ</span></p>
|
||||
<div className="mu-kpi-grid" id="stops-kpi" aria-label="summary metrics" />
|
||||
</div>
|
||||
<div className="mu-hero-map">
|
||||
<p className="mu-hero-map-title"><span data-i18n="stops.mapTitle">แผนที่ย่อของเครือข่ายป้าย</span></p>
|
||||
<div className="mu-hero-map-box">
|
||||
<img className="mu-hero-map-photo" src="/image/network/overview-map.png" alt="แผนที่เครือข่ายป้าย Atroute" loading="lazy" decoding="async" />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<form className="mu-toolbar" id="stops-form" data-prevent-submit="1">
|
||||
{/* โหมดค้นหา: เลือกอย่างใดอย่างหนึ่ง (ห้ามชนกัน) */}
|
||||
<div className="mu-search-tabs" role="tablist" aria-label="รูปแบบการค้นหา">
|
||||
<button type="button" className="mu-search-tab" data-mode="code" role="tab" aria-selected="true">
|
||||
<svg className="ic" aria-hidden="true"><use href="#ic-map-pin" /></svg>
|
||||
<span data-i18n="stops.modeCode">ค้นหาด้วยรหัสป้าย</span>
|
||||
</button>
|
||||
<button type="button" className="mu-search-tab" data-mode="place" role="tab" aria-selected="false">
|
||||
<svg className="ic" aria-hidden="true"><use href="#ic-landmark" /></svg>
|
||||
<span data-i18n="stops.modePlace">ค้นหาด้วยชื่อสถานที่</span>
|
||||
</button>
|
||||
</div>
|
||||
{/* โหมด 1: รหัสป้าย (5 ช่อง: 2 หน้า + 3 หลัง) */}
|
||||
<div className="mu-search-mode" id="stops-code-wrap">
|
||||
<div className="mu-code-boxes" id="stops-code-boxes" role="group" data-i18n-attr="aria-label:stops.codePh" aria-label="รหัสป้าย">
|
||||
<input className="mu-code-cell" type="text" inputMode="numeric" maxLength={1} autoComplete="off" aria-label="หลักที่ 1" placeholder="0" />
|
||||
<input className="mu-code-cell" type="text" inputMode="numeric" maxLength={1} autoComplete="off" aria-label="หลักที่ 2" placeholder="0" />
|
||||
<span className="mu-code-plus" aria-hidden="true">+</span>
|
||||
<input className="mu-code-cell" type="text" inputMode="numeric" maxLength={1} autoComplete="off" aria-label="หลักที่ 3" placeholder="0" />
|
||||
<input className="mu-code-cell" type="text" inputMode="numeric" maxLength={1} autoComplete="off" aria-label="หลักที่ 4" placeholder="0" />
|
||||
<input className="mu-code-cell" type="text" inputMode="numeric" maxLength={1} autoComplete="off" aria-label="หลักที่ 5" placeholder="0" />
|
||||
</div>
|
||||
<p className="mu-code-display" id="stops-code-display" hidden />
|
||||
<p className="mu-search-hint" data-i18n="stops.codeHintBox">พิมพ์ตัวเลขในช่อง ระบบจะเติม 0 ให้อัตโนมัติเมื่อเว้นว่าง</p>
|
||||
<div className="mu-numpad" id="stops-numpad">
|
||||
<button type="button" data-key={1}>1</button>
|
||||
<button type="button" data-key={2}>2</button>
|
||||
<button type="button" data-key={3}>3</button>
|
||||
<button type="button" data-key={4}>4</button>
|
||||
<button type="button" data-key={5}>5</button>
|
||||
<button type="button" data-key={6}>6</button>
|
||||
<button type="button" data-key={7}>7</button>
|
||||
<button type="button" data-key={8}>8</button>
|
||||
<button type="button" data-key={9}>9</button>
|
||||
<button type="button" data-key={0}>0</button>
|
||||
<button type="button" data-key="back"><span data-i18n="stops.padDelete">ลบ</span></button>
|
||||
</div>
|
||||
</div>
|
||||
{/* โหมด 2: ชื่อสถานที่ */}
|
||||
<div className="mu-search-mode" id="stops-place-wrap" hidden>
|
||||
<div className="mu-search-field">
|
||||
<svg className="ic" aria-hidden="true"><use href="#ic-search" /></svg>
|
||||
<input type="search" id="stops-place-input" autoComplete="off" placeholder="โรงพยาบาลอ่างทอง" data-i18n-attr="placeholder:stops.placePh,aria-label:stops.placePh" />
|
||||
</div>
|
||||
<div className="mu-suggest" id="stops-suggest" hidden />
|
||||
<p className="mu-search-hint" data-i18n="stops.placeHint">พิมพ์ชื่อสถานที่สำคัญ เช่น โรงพยาบาล สำนักงานที่ดิน แล้วเลือกรายการที่ตรงกัน</p>
|
||||
</div>
|
||||
<div className="mu-toolbar-actions">
|
||||
<button type="button" className="mu-btn primary" id="stops-search-btn"><span data-i18n="common.search">ค้นหา</span></button>
|
||||
<button type="button" className="mu-btn ghost" id="stops-reset-btn"><span data-i18n="stops.reset">ล้างค่า</span></button>
|
||||
<button type="button" className="mu-btn ghost" id="near-me-btn">
|
||||
<svg className="ic" aria-hidden="true"><use href="#ic-map-pin" /></svg>
|
||||
<span data-i18n="map.useMyLocation">ป้ายใกล้ฉัน</span>
|
||||
</button>
|
||||
<a className="mu-btn ghost" href="/"><span data-i18n="common.back">ย้อนกลับ</span></a>
|
||||
</div>
|
||||
<p className="mu-toolbar-count" id="stops-count" hidden />
|
||||
</form>
|
||||
<div id="near-me-result" className="mu-near-wrap" hidden />
|
||||
<ul className="mu-stop-grid" id="stops-list" />
|
||||
<div className="mu-show-more">
|
||||
<button type="button" className="mu-btn outline" id="stops-show-all" data-i18n="stops.showAll" hidden>แสดงป้ายทั้งหมด</button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user