Files
web-at-transit-mock/ui/partials/home.html
T
Bkk1234 656f65b41c แผนที่จาก GPKG + บทความ 6 ชิ้น + ลดความหนา footer
== แผนที่ / GIS ==
- qgis-to-web.py: อ่าน GPKG ได้ (--from gpkg) + เพิ่ม dream-Watcharapol
- เพิ่ม dream-*.geojson 6 ไฟล์ (เส้นทางที่เสนอ: บ้านภาชี · ชานเมืองอยุธยา · HSR · เมืองทองธานี · ปากเกร็ด · วัชรพล)
- map.js: ATMap.proposal() วาดเส้นจริงจาก geojson (ไม่ใช่เส้นตรง) · smoothFactor 0.5
  · coordOf() รับ coords=[lat,lng] · fitAll รับได้ทั้งจุดเดี่ยวและเส้น · setStyle บน featureGroup

== บทความ (blog) ==
- text3: ถ้าผมได้ออกแบบสายเดินรถเอง (จาก mydream.html) TH+EN
- text4: วิธีเดินทางไปสถานีรถไฟ และสนามบิน (จาก train-airplane.html) TH+EN
- text5/text6: โครงเปล่ารอเติมเนื้อหา (แสวงหา-โพธิ์ทอง · อำเภอเข้าเมือง)
- แผนที่ความฝัน: map.groups 3 กลุ่ม · คลิกเส้น/หมุด/แถวได้ · ป้ายที่มา
- ย่อหน้า: ระยะห่าง 20px + ย่อหน้าหน้าบรรทัด 1.5em

== ตารางเดินรถ ==
- เปลี่ยนชื่อคีย์ dir_* -> direction_* ทุกไฟล์ (backward-compat ในโค้ด)
- 1011: จุดย่อย 2 ทิศ + offsets [0,25,55]
- 954/2194: จุดย่อย station 8 + offsets
- refreshHighlights: วนข้ามวันเมื่อเลยเที่ยวสุดท้าย + ไฮเทลต์ชิปทุกจุด
- 8 other_stop.md: อัปเดตตรงข้อมูลจริง 8 รายการ

== i18n ==
- แยกไฟล์ต่อภาษา ui/locales/{th,en}.json + i18n.js = loader (ลด 28KB -> 6.5KB)
- resource/tools/check-i18n.py ตรวจคีย์ขาด/ซ้ำ
- ข้อความผู้สนับสนุนหน้าแรก + คำแปล EN

== UI ==
- ฝังฟอนต์ K2D (ui/vendor/fonts/) ออฟไลน์ 100%
- cache busting ?v=<SW VERSION> ทุกรูป (ui/imageurl.js)
- footer: ลดความหนา 468 -> 349px + line-height 1.5 กันสระ/วรรณยุกต์ซ้อน
- QR modal + ปุ่มคัดลอกลิงก์ · หน้าอัปเดตล่าสุดใน #/check
- credits: ขอขอบคุณภาพรถ 3 สาย

== เครื่องมือ ==
- bump-version.py · stamp-schedules.py · derive-times.py (จุดอ้างอิง ± นาที)
2026-10-05 03:55:09 +07:00

114 lines
9.7 KiB
HTML

<style>
/* ปุ่มแชร์ลิงก์สั้น — มุมล่างขวา ต่อจากการ์ดหมวดเส้นทาง */
.mu-share-row { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin: 22px 0 44px; }
.mu-share-btn {
display: inline-flex; align-items: center; gap: 8px;
padding: 10px 16px; border: 1px solid #7a4cc0; border-radius: 8px;
background: #7a4cc0; color: #fff; font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer;
}
.mu-share-btn:hover { background: #6a3cae; }
.mu-share-btn:focus-visible { outline: 2px solid #2b2f42; outline-offset: 2px; }
.mu-share-btn .ic { width: 18px; height: 18px; }
.mu-share-status { margin: 0; font-size: .82rem; line-height: 1.7; color: #4b5570; text-align: right; }
.mu-share-status:empty { display: none; }
.mu-share-url { display: inline-block; padding: 2px 6px; border: 1px solid #e7e2f6; border-radius: 8px; background: #faf9ff; font-size: .8rem; }
.mu-share-line { display: inline-block; margin-left: 6px; font-weight: 700; color: #06c755; text-decoration: none; }
.mu-share-line:hover { text-decoration: underline; }
@media (max-width: 560px) {
.mu-share-row { align-items: stretch; }
.mu-share-btn { justify-content: center; }
.mu-share-status { text-align: left; }
}
</style>
<section class="mu-hero">
<img class="mu-hero-map" src="../.image/network/overview-map.png" alt="" aria-hidden="true" fetchpriority="high" 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" data-i18n="home.welcome">ยินดีต้อนรับ</span>
<h1><span data-i18n="home.title1">สถานีขนส่งผู้โดยสารภายใน</span><br><span class="mu-gradient-text" id="hero-province">จังหวัดอ่างทอง</span></h1>
<div class="mu-route-selector">
<div class="mu-select-field">
<label for="province-select">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="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 class="mu-select-box">
<svg class="mu-select-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="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"></select>
<svg class="mu-select-chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg>
</div>
</div>
<span class="mu-select-arrow" aria-hidden="true"><svg class="ic"><use href="#ic-arrow-right"/></svg></span>
<div class="mu-select-field">
<label for="station-select">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="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 class="mu-select-box">
<svg class="mu-select-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="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"></select>
<svg class="mu-select-chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg>
</div>
</div>
</div>
<p class="mu-select-hint" id="station-hint" aria-live="polite"></p>
</div>
</section>
<section class="mu-sponsor-marquee" aria-label="ผู้สนับสนุนและพาร์ทเนอร์">
<div class="mu-sponsor-head">
<h4 data-i18n="footer.sponsors">ผู้สนับสนุน &amp; พาร์ทเนอร์</h4>
<p class="lead" data-i18n="footer.sponsorsLead">ร่วมเป็นผู้สนับสนุนเราได้ เมื่อซื้อของออนไลน์ หรือซื้อตั๋วรถทัวร์ เครื่องบิน ออนไลน์กดเลือกสินค้า หรือบริการผ่านลิงค์นายหน้าของเราไม่มีค่าใช้จ่ายเพิ่ม</p>
</div>
<div class="mu-marquee">
<div class="mu-marquee-track">
<a class="mu-marquee-tile" href="#" aria-label="7-Eleven"><img src="../.image/partners/7-11.png" alt="7-Eleven" decoding="async"></a>
<a class="mu-marquee-tile" href="#" aria-label="Shopee"><img src="../.image/partners/shopee.png" alt="Shopee" decoding="async"></a>
<a class="mu-marquee-tile" href="#" aria-label="Lazada"><img src="../.image/partners/lazada.png" alt="Lazada" decoding="async"></a>
<a class="mu-marquee-tile" href="#" aria-label="airasia MOVE"><img src="../.image/partners/airasia-move.png" alt="airasia MOVE" decoding="async"></a>
<a class="mu-marquee-tile" href="#" aria-label="busonlineticket"><img src="../.image/partners/busonlineticket.png" alt="busonlineticket" decoding="async"></a>
<a class="mu-marquee-tile" href="#" aria-label="Trip.com"><img src="../.image/partners/trip.jpg" alt="Trip.com" decoding="async"></a>
<a class="mu-marquee-tile" href="#" aria-label="truck2hand"><img src="../.image/partners/truck2hand.png" alt="truck2hand" decoding="async"></a>
<a class="mu-marquee-tile" href="#" aria-label="ทีซีแอล 999 อ่างทอง"><img src="../.image/partners/tcl999-angthong.jpg" alt="ทีซีแอล 999 อ่างทอง" decoding="async"></a>
</div>
</div>
</section>
<main class="mu-main">
<div class="mu-container">
<!-- คำอธิบายสีการ์ดตามหมวดเส้นทาง -->
<section class="mu-legend" aria-label="คำอธิบายสีการ์ดตามหมวดเส้นทาง">
<h2 class="mu-legend-title" data-i18n="legend.title">คำอธิบายสีการ์ดตามหมวดเส้นทาง</h2>
<ul class="mu-legend-list">
<li><span class="sw sw-bangkok" aria-hidden="true"></span><span data-i18n="legend.bangkok">หมวดเส้นทางเข้ากรุงเทพฯ — การ์ดสีน้ำเงิน</span></li>
<li><span class="sw sw-interprov" aria-hidden="true"></span><span data-i18n="legend.interprov">หมวดเส้นทางระหว่างจังหวัด — การ์ดสีม่วง</span></li>
<li><span class="sw sw-inprov" aria-hidden="true"></span><span data-i18n="legend.inprov">หมวดเส้นทางภายในจังหวัด — การ์ดสีชมพู</span></li>
<li><span class="sw sw-municipal" aria-hidden="true"></span><span data-i18n="legend.municipal">หมวดเส้นทางภายในเทศบาล — การ์ดสีเหลืองอ่อน</span></li>
<li><span class="sw sw-empty" aria-hidden="true"></span><span data-i18n="legend.empty">ยังไม่มีข้อมูล — การ์ดสีเทา แสดง N/A แทนเลขสาย</span></li>
</ul>
<p class="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>
<!-- ปุ่มแชร์ลิงก์สั้น (มุมล่างขวา ต่อจากการ์ดหมวดเส้นทางภายในจังหวัด) -->
<div class="mu-share-row">
<button type="button" class="mu-share-btn" id="share-btn">
<svg class="ic" aria-hidden="true"><use href="#ic-share-2"/></svg>
<span data-i18n="share.label">แชร์ลิงก์สั้น</span>
</button>
<p class="mu-share-status" id="share-status" aria-live="polite"></p>
</div>
</div>
</main>
<script src="./partials/home.init.js"></script>