navbar: rebuild mock header from the Next implementation (source of truth)

- markup: lang + theme moved into .mu-topbar-tools (theme first, then lang),
  same order as web-at-transit: brand, nav, menu, tools, CTA
- CSS: replaced mock's .mu-lang-*/.mu-theme-* buttons with the Next rules
  (.mu-pop / .mu-pop-btn / .mu-pop-btn-lang / .mu-pop-panel / .mu-pop-item,
  40px tall, radius 8px, surface bg, 44px on coarse pointers)
- lang button keeps short label + 12px chevron; menu items use
  .mu-pop-item-th/.mu-pop-item-en and data-active for the selected row
- nav 0.95rem (was .92rem), header border -> var(--c-border)
- theme.js was never included in the shell (regex missed the versioned src) —
  added after i18n.js + precached with theme.css; that was why the theme menu
  did not open in the previous build
- VERSION 2026.09.27.120
This commit is contained in:
Bkk1234 committed 2026-11-04 01:37:50 +07:00
1 parent 5800a61da3
commit eabcff197c
7 files changed
+134 -102

No files matched your search

+68 -45
View File
@@ -406,85 +406,108 @@ body:has(.mu-site-footer) .mu-footer { display: none; }
padding: 10px 12px 10px 38px; padding: 10px 12px 10px 38px;
} }
/* ---------- ปุ่มสลับภาษา (dropdown เดียว — ไทย / English) ---------- */ /* ============================================================
.mu-lang-switch { ปุ่มเครื่องมือในแถบนำทาง — พอร์ตจาก web-at-transit (ต้นทางความจริง)
position: relative; ธีม 1 ปุ่ม · ภาษา 1 ปุ่ม · แต่ละปุ่มมีเมนูของตัวเอง
display: inline-flex; radius 8px · สูง 40px (44px บนจอสัมผัส)
============================================================ */
.mu-topbar-tools {
display: flex;
align-items: center; align-items: center;
gap: 8px; /* WCAG 2.5.8 — เว้นระหว่างเป้ากด ≥ 8px */
flex-shrink: 0; flex-shrink: 0;
} }
.mu-lang-btn {
.mu-pop { position: relative; display: inline-flex; }
.mu-pop-btn {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
gap: 6px; justify-content: center;
min-height: 34px; gap: 4px;
padding: 6px 12px; min-width: 40px;
border: 1px solid #e4dcf2; height: 40px;
border-radius: 999px; padding: 0 8px;
background: var(--c-surface-3); border: 1px solid var(--c-border);
border-radius: var(--radius);
background: var(--c-surface);
color: var(--c-brand-ink); color: var(--c-brand-ink);
font-family: inherit; font-family: inherit;
font-size: .78rem;
font-weight: 700; font-weight: 700;
font-size: .76rem;
line-height: 1; line-height: 1;
cursor: pointer; cursor: pointer;
transition: background .15s ease, color .15s ease, border-color .15s ease; transition: border-color .15s ease, background .15s ease;
} }
.mu-lang-btn:hover { color: var(--c-brand-ink); border-color: var(--c-border); } .mu-pop-btn-lang { min-width: 56px; padding: 0 10px; }
.mu-lang-btn[aria-expanded="true"] { background: var(--c-surface); border-color: #cbb8ea; } .mu-pop-btn:hover { border-color: #d8c9f2; background: var(--c-surface-2); }
.mu-lang-btn .ic { width: 15px; height: 15px; } .mu-pop-btn:active { transform: translateY(1px); }
.mu-lang-caret { .mu-pop-btn:focus-visible {
width: 0 !important; outline: 2px solid var(--c-focus);
height: 0 !important; outline-offset: 2px;
margin-left: 1px;
border: 4px solid transparent;
border-top-color: currentColor;
transition: transform .18s ease;
} }
.mu-lang-btn[aria-expanded="true"] .mu-lang-caret { transform: rotate(180deg); } .mu-pop-btn[aria-expanded="true"] {
.mu-lang-menu { border-color: var(--c-brand-ink);
background: var(--c-surface-2);
}
.mu-pop-btn .ic { width: 18px; height: 18px; }
/* เมนูที่กางออก */
.mu-pop-panel {
position: absolute; position: absolute;
top: calc(100% + 6px); top: calc(100% + 6px);
right: 0; right: 0;
z-index: 1200; z-index: 1200;
min-width: 168px; min-width: 168px;
padding: 6px; padding: 6px;
background: var(--c-surface);
border: 1px solid var(--c-border); border: 1px solid var(--c-border);
border-radius: 12px; border-radius: var(--radius);
box-shadow: 0 10px 28px rgba(15, 23, 42, .14); background: var(--c-surface);
box-shadow: 0 10px 24px var(--c-shadow);
} }
.mu-lang-menu[hidden] { display: none; } .mu-pop-panel[hidden] { display: none; }
.mu-lang-menu button {
.mu-pop-item {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 8px; gap: 8px;
width: 100%; width: 100%;
min-height: 38px; min-height: 40px;
padding: 8px 10px; padding: 8px 10px;
border: 0; border: 0;
border-radius: 8px; border-radius: var(--radius-sm);
background: transparent; background: transparent;
color: var(--c-ink); color: var(--c-ink);
font-family: inherit; font-family: inherit;
font-size: .84rem; font-size: .85rem;
font-weight: 600; font-weight: 600;
text-align: left; text-align: start;
cursor: pointer; cursor: pointer;
} }
.mu-lang-menu button:hover { background: #f6f2ff; } .mu-pop-item:hover { background: var(--c-surface-2); }
.mu-lang-menu button[aria-checked="true"] { color: var(--c-brand-ink); font-weight: 800; background: var(--c-brand-soft); } .mu-pop-item:focus-visible {
.mu-lang-menu button .mu-lang-code { outline: 2px solid var(--c-focus);
margin-left: auto; outline-offset: -2px;
font-family: ui-monospace, "IBM Plex Mono", monospace;
font-size: .72rem;
color: var(--c-ink-3);
} }
.mu-pop-item[data-active="1"] {
background: var(--c-tint-purple);
color: var(--c-brand-ink);
font-weight: 700;
}
.mu-pop-item-th { flex: 1 1 auto; }
.mu-pop-item-en {
flex: 0 0 auto;
font-size: .72rem;
font-weight: 600;
color: var(--c-ink-2);
letter-spacing: .04em;
}
.mu-pop-item[data-active="1"] .mu-pop-item-en { color: var(--c-brand-ink); }
/* ---------- ปุ่มธีม (dropdown 3 โหมด — สว่าง / มืด / ตามอุปกรณ์) ---------- */ @media (pointer: coarse) {
.mu-theme-btn { padding: 6px 9px; } .mu-pop-btn { min-width: 44px; height: 44px; }
.mu-theme-icon { display: inline-flex; } .mu-pop-btn-lang { min-width: 60px; }
.mu-theme-icon svg { width: 16px; height: 16px; } }
/* ============================================================ /* ============================================================
ปุ่ม + ฟอร์มคอนโทรล (shared — ทุกหน้าใช้ร่วมกัน) ปุ่ม + ฟอร์มคอนโทรล (shared — ทุกหน้าใช้ร่วมกัน)
+1
View File
@@ -100,6 +100,7 @@
var on = btn.getAttribute('data-i18n-switch') === current; var on = btn.getAttribute('data-i18n-switch') === current;
btn.classList.toggle('active', on); btn.classList.toggle('active', on);
btn.setAttribute('aria-checked', on ? 'true' : 'false'); btn.setAttribute('aria-checked', on ? 'true' : 'false');
if (on) btn.setAttribute('data-active', '1'); else btn.removeAttribute('data-active');
}); });
var label = document.getElementById('lang-label'); var label = document.getElementById('lang-label');
if (label) label.textContent = current === 'en' ? 'EN' : 'ไทย'; if (label) label.textContent = current === 'en' ? 'EN' : 'ไทย';
+58 -53
View File
@@ -19,16 +19,16 @@
</script> </script>
<title>หน้าแรก | Atroute (mockup)</title> <title>หน้าแรก | Atroute (mockup)</title>
<!-- ฟอนต์หลัก K2D: ไฟล์ในโปรเจกต์ (ui/vendor/fonts/) — ทำงานออฟไลน์ได้ --> <!-- ฟอนต์หลัก K2D: ไฟล์ในโปรเจกต์ (ui/vendor/fonts/) — ทำงานออฟไลน์ได้ -->
<link href="./vendor/fonts/k2d.css?v=2026.09.27.116" rel="stylesheet"> <link href="./vendor/fonts/k2d.css?v=2026.09.27.120" rel="stylesheet">
<!-- ตัวสำรอง (โหลดจาก CDN เมื่อออนไลน์เท่านั้น · ออฟไลน์ถอยไปใช้ system-ui) --> <!-- ตัวสำรอง (โหลดจาก CDN เมื่อออนไลน์เท่านั้น · ออฟไลน์ถอยไปใช้ system-ui) -->
<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="./theme.css?v=2026.09.27.116" rel="stylesheet"> <link href="./theme.css?v=2026.09.27.120" rel="stylesheet">
<link href="./_shared.css?v=2026.09.27.116" rel="stylesheet"> <link href="./_shared.css?v=2026.09.27.120" rel="stylesheet">
<link href="./vendor/leaflet/leaflet.css?v=2026.09.27.116" rel="stylesheet"> <link href="./vendor/leaflet/leaflet.css?v=2026.09.27.120" rel="stylesheet">
<link href="./map.css?v=2026.09.27.116" rel="stylesheet"> <link href="./map.css?v=2026.09.27.120" rel="stylesheet">
<meta name="app-version" content="2026.09.27.116"> <meta name="app-version" content="2026.09.27.120">
<link rel="icon" type="image/png" href="../.image/icons/minibus-512x512.png?v=2026.09.27.116"> <link rel="icon" type="image/png" href="../.image/icons/minibus-512x512.png?v=2026.09.27.120">
<style> <style>
.mu-card.empty { width: 100%; padding: 16px; text-align: center; color: var(--c-ink-2); background: #fff7fb; border: 1px dashed #f4c7df; } .mu-card.empty { width: 100%; padding: 16px; text-align: center; color: var(--c-ink-2); background: #fff7fb; border: 1px dashed #f4c7df; }
a.mu-card { text-decoration: none; color: inherit; display: block; } a.mu-card { text-decoration: none; color: inherit; display: block; }
@@ -87,7 +87,7 @@
/* Topbar */ /* Topbar */
/* z-index 1100 — ต้องสูงกว่า Leaflet (pane 400 · control 800 · .leaflet-top 1000) /* z-index 1100 — ต้องสูงกว่า Leaflet (pane 400 · control 800 · .leaflet-top 1000)
ไม่งั้นแผนที่จะบัง nav ตอนเลื่อน */ ไม่งั้นแผนที่จะบัง nav ตอนเลื่อน */
.mu-topbar { background: var(--c-surface); border-bottom: 1px solid #e9eef7; position: sticky; top: 0; z-index: 1100; box-shadow: 0 2px 8px rgba(20,40,90,.04); } .mu-topbar { background: var(--c-surface); border-bottom: 1px solid var(--c-border); position: sticky; top: 0; z-index: 1100; 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; text-decoration: none; color: inherit; } .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; transition: transform .15s ease; } .mu-logo-img { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg,#8b5cf6,#ec4899); padding: 4px; transition: transform .15s ease; }
@@ -96,10 +96,10 @@
.mu-brand:hover .mu-brand-title { color: var(--c-brand-ink); } .mu-brand:hover .mu-brand-title { color: var(--c-brand-ink); }
.mu-brand-subtitle { display: block; margin: 0; font-size: .72rem; color: var(--c-ink-2); } .mu-brand-subtitle { display: block; margin: 0; font-size: .72rem; color: var(--c-ink-2); }
.mu-nav { margin-left: auto; display: flex; gap: 28px; } .mu-nav { margin-left: auto; display: flex; gap: 28px; }
.mu-nav a { color: var(--c-ink-2); text-decoration: none; font-size: .92rem; font-weight: 600; padding: 6px 4px; border-bottom: 2px solid transparent; } .mu-nav a { color: var(--c-ink-2); text-decoration: none; font-size: .95rem; font-weight: 600; padding: 6px 4px; border-bottom: 2px solid transparent; }
.mu-nav a.active { color: var(--c-danger); border-bottom-color: var(--c-danger); } .mu-nav a.active { color: var(--c-danger); border-bottom-color: var(--c-danger); }
.mu-nav a:hover { color: var(--c-ink); } .mu-nav a:hover { color: var(--c-ink); }
.mu-action-btn { background: linear-gradient(135deg,#a855f7,#7c3aed); color:#fff; padding: 10px 22px; border-radius: 999px; text-decoration:none; font-weight: 700; font-size:.88rem; box-shadow: 0 6px 14px rgba(124,58,237,.3); } .mu-action-btn { background: linear-gradient(135deg,#a855f7,#7c3aed); color:#fff; padding: 10px 22px; border-radius: 999px; text-decoration:none; font-weight: 700; font-size:.85rem; box-shadow: 0 6px 14px rgba(124,58,237,.3); }
/* Hero */ /* Hero */
.mu-hero { position: relative; overflow: hidden; padding: 56px 0 64px; background: linear-gradient(180deg, #f0ebff 0%, #ffe8ee 50%, #fff4d6 100%); text-align: center; } .mu-hero { position: relative; overflow: hidden; padding: 56px 0 64px; background: linear-gradient(180deg, #f0ebff 0%, #ffe8ee 50%, #fff4d6 100%); text-align: center; }
@@ -320,19 +320,20 @@
</script> </script>
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default"> <meta name="apple-mobile-web-app-status-bar-style" content="default">
<link rel="apple-touch-icon" href="../.image/icons/minibus-192x192.png?v=2026.09.27.116"> <link rel="apple-touch-icon" href="../.image/icons/minibus-192x192.png?v=2026.09.27.120">
<script src="./imageurl.js?v=2026.09.27.116" defer></script> <script src="./imageurl.js?v=2026.09.27.120" defer></script>
<script src="./pwa.js?v=2026.09.27.116" defer></script> <script src="./pwa.js?v=2026.09.27.120" defer></script>
<script src="./i18n.js?v=2026.09.27.116" defer></script> <script src="./i18n.js?v=2026.09.27.120" defer></script>
<script src="./analytics.js?v=2026.09.27.116" defer></script> <script src="./theme.js?v=2026.09.27.120" defer></script>
<script src="./popular.js?v=2026.09.27.116" defer></script> <script src="./analytics.js?v=2026.09.27.120" defer></script>
<script src="./vendor/leaflet/leaflet.js?v=2026.09.27.116" defer></script> <script src="./popular.js?v=2026.09.27.120" defer></script>
<script src="./map.js?v=2026.09.27.116" defer></script> <script src="./vendor/leaflet/leaflet.js?v=2026.09.27.120" defer></script>
<script src="./partials/schedules.js?v=2026.09.27.116" defer></script> <script src="./map.js?v=2026.09.27.120" defer></script>
<script src="./partials/otherStop.js?v=2026.09.27.116" defer></script> <script src="./partials/schedules.js?v=2026.09.27.120" defer></script>
<script src="./motion.js?v=2026.09.27.116" defer></script> <script src="./partials/otherStop.js?v=2026.09.27.120" defer></script>
<script src="./router.js?v=2026.09.27.116" defer></script> <script src="./motion.js?v=2026.09.27.120" defer></script>
<link rel="stylesheet" href="./responsive.css?v=2026.09.27.116"> <script src="./router.js?v=2026.09.27.120" defer></script>
<link rel="stylesheet" href="./responsive.css?v=2026.09.27.120">
</head> </head>
<body class="main-theme-page"> <body class="main-theme-page">
<svg xmlns="http://www.w3.org/2000/svg" style="display:none" aria-hidden="true"> <svg xmlns="http://www.w3.org/2000/svg" style="display:none" aria-hidden="true">
@@ -426,7 +427,7 @@
<header class="mu-topbar"> <header class="mu-topbar">
<div class="mu-container mu-topbar-inner"> <div class="mu-container mu-topbar-inner">
<a class="mu-brand" href="#/" aria-label="Atroute — หน้าแรก" data-i18n-attr="aria-label:aria.brandHome"> <a class="mu-brand" href="#/" aria-label="Atroute — หน้าแรก" data-i18n-attr="aria-label:aria.brandHome">
<img class="mu-logo-img" src="../.image/icons/minibus-512x512.png?v=2026.09.27.116" alt="Atroute logo" width="44" height="44" decoding="async"> <img class="mu-logo-img" src="../.image/icons/minibus-512x512.png?v=2026.09.27.120" alt="Atroute logo" width="44" height="44" decoding="async">
<span> <span>
<span class="mu-brand-title">Atroute</span> <span class="mu-brand-title">Atroute</span>
<span class="mu-brand-subtitle" data-i18n="brand.subtitle">สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</span> <span class="mu-brand-subtitle" data-i18n="brand.subtitle">สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</span>
@@ -454,39 +455,43 @@
<a href="#/credits" data-i18n="nav.credits" role="menuitem">เครดิต</a> <a href="#/credits" data-i18n="nav.credits" role="menuitem">เครดิต</a>
</div> </div>
</details> </details>
<div class="mu-lang-switch" id="lang-switch"> <div class="mu-topbar-tools">
<button type="button" class="mu-lang-btn" id="lang-btn" aria-haspopup="menu" aria-expanded="false" <div class="mu-pop" id="theme-switch">
aria-label="ภาษา / Language" data-i18n-attr="aria-label:aria.langSwitch"> <button type="button" class="mu-pop-btn" id="theme-btn" aria-haspopup="menu"
<svg class="ic" aria-hidden="true"><use href="#ic-globe"/></svg> aria-expanded="false" aria-label="ธีม / Theme">
<span id="lang-label">ไทย</span> <span id="theme-icon" aria-hidden="true"></span>
<span class="mu-lang-caret" aria-hidden="true"></span>
</button>
<div class="mu-lang-menu" id="lang-menu" role="menu" hidden aria-label="ภาษา / Language">
<button type="button" role="menuitemradio" aria-checked="true" data-i18n-switch="th">
ภาษาไทย <span class="mu-lang-code">TH</span>
</button> </button>
<button type="button" role="menuitemradio" aria-checked="false" data-i18n-switch="en"> <div class="mu-pop-panel" id="theme-menu" role="menu" hidden aria-label="ธีม / Theme">
English <span class="mu-lang-code">EN</span> <button type="button" class="mu-pop-item" role="menuitemradio" aria-checked="false" data-theme-mode="light">
</button> <span class="mu-pop-item-th mu-theme-label">สว่าง</span><span class="mu-pop-item-en">Light</span>
</button>
<button type="button" class="mu-pop-item" role="menuitemradio" aria-checked="false" data-theme-mode="dark">
<span class="mu-pop-item-th mu-theme-label">มืด</span><span class="mu-pop-item-en">Dark</span>
</button>
<button type="button" class="mu-pop-item" role="menuitemradio" aria-checked="true" data-theme-mode="auto">
<span class="mu-pop-item-th mu-theme-label">ตามอุปกรณ์</span><span class="mu-pop-item-en">Device</span>
</button>
</div>
</div> </div>
</div>
<div class="mu-lang-switch mu-theme-switch" id="theme-switch"> <div class="mu-pop" id="lang-switch">
<button type="button" class="mu-lang-btn mu-theme-btn" id="theme-btn" aria-haspopup="menu" <button type="button" class="mu-pop-btn mu-pop-btn-lang" id="lang-btn" aria-haspopup="menu"
aria-expanded="false" aria-label="ธีม / Theme"> aria-expanded="false" aria-label="ภาษา / Language" data-i18n-attr="aria-label:aria.langSwitch">
<span id="theme-icon" class="mu-theme-icon" aria-hidden="true"></span> <span id="lang-label">ไทย</span>
</button> <svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2.5"
<div class="mu-lang-menu" id="theme-menu" role="menu" hidden aria-label="ธีม / Theme"> stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg>
<button type="button" role="menuitemradio" aria-checked="false" data-theme-mode="light">
<span class="mu-theme-label">สว่าง</span><span class="mu-lang-code">Light</span>
</button>
<button type="button" role="menuitemradio" aria-checked="false" data-theme-mode="dark">
<span class="mu-theme-label">มืด</span><span class="mu-lang-code">Dark</span>
</button>
<button type="button" role="menuitemradio" aria-checked="true" data-theme-mode="auto">
<span class="mu-theme-label">ตามอุปกรณ์</span><span class="mu-lang-code">Device</span>
</button> </button>
<div class="mu-pop-panel" id="lang-menu" role="menu" hidden aria-label="ภาษา / Language">
<button type="button" class="mu-pop-item" role="menuitemradio" aria-checked="true" data-i18n-switch="th">
<span class="mu-pop-item-th">ภาษาไทย</span><span class="mu-pop-item-en">TH</span>
</button>
<button type="button" class="mu-pop-item" role="menuitemradio" aria-checked="false" data-i18n-switch="en">
<span class="mu-pop-item-th">English</span><span class="mu-pop-item-en">EN</span>
</button>
</div>
</div> </div>
</div> </div>
<a class="mu-action-btn" href="#/check" data-i18n="cta.check">เช็กเวลาเดินรถ</a> <a class="mu-action-btn" href="#/check" data-i18n="cta.check">เช็กเวลาเดินรถ</a>
</div> </div>
</header> </header>
@@ -498,7 +503,7 @@
<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?v=2026.09.27.116" alt="Atroute"> <img src="../.image/icons/minibus-512x512.png?v=2026.09.27.120" alt="Atroute">
<div> <div>
<strong>Atroute</strong> <strong>Atroute</strong>
<span data-i18n="brand.subtitle">สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</span> <span data-i18n="brand.subtitle">สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</span>
+2 -2
View File
@@ -201,9 +201,9 @@ main.mu-container { padding-top: 14px; padding-bottom: 14px; }
.mu-topbar-inner { gap: 18px; padding: 14px 28px; flex-wrap: nowrap; } .mu-topbar-inner { gap: 18px; padding: 14px 28px; flex-wrap: nowrap; }
.mu-logo-img { width: 44px; height: 44px; } .mu-logo-img { width: 44px; height: 44px; }
.mu-nav { order: 0; width: auto; margin-left: auto; justify-content: flex-start; gap: 24px; display: flex; } .mu-nav { order: 0; width: auto; margin-left: auto; justify-content: flex-start; gap: 24px; display: flex; }
.mu-nav a { font-size: .92rem; } .mu-nav a { font-size: .95rem; }
.mu-menu { display: none; } .mu-menu { display: none; }
.mu-lang-btn { font-size: .72rem; padding: 6px 10px; }
.mu-hero { padding: 44px 0 52px; } .mu-hero { padding: 44px 0 52px; }
.mu-hero-actions { margin-top: 14px; } .mu-hero-actions { margin-top: 14px; }
.mu-marquee-tile { width: 170px; height: 96px; margin-right: 16px; } .mu-marquee-tile { width: 170px; height: 96px; margin-right: 16px; }
+3 -1
View File
@@ -13,7 +13,7 @@
- ขั้นตอนอัปเดต: ดู AGENTS.md หัวข้อ PWA - ขั้นตอนอัปเดต: ดู AGENTS.md หัวข้อ PWA
============================================================ */ ============================================================ */
const VERSION = "2026.09.27.116"; // ← bump ทุกครั้งที่แก้ SW เอง const VERSION = "2026.09.27.120"; // ← bump ทุกครั้งที่แก้ SW เอง
const CACHE = `at-transit-${VERSION}`; const CACHE = `at-transit-${VERSION}`;
const PRECACHE = [ const PRECACHE = [
@@ -32,6 +32,8 @@ const PRECACHE = [
"./i18n.js", "./i18n.js",
"./popular.js", "./popular.js",
"./analytics.js", "./analytics.js",
"./theme.js",
"./theme.css",
"./router.js", "./router.js",
"./motion.js", "./motion.js",
"./partials/home.html", "./partials/home.html",
+1
View File
@@ -55,6 +55,7 @@
Array.prototype.forEach.call(items, function (b) { Array.prototype.forEach.call(items, function (b) {
var on = b.getAttribute('data-theme-mode') === currentMode; var on = b.getAttribute('data-theme-mode') === currentMode;
b.setAttribute('aria-checked', on ? 'true' : 'false'); b.setAttribute('aria-checked', on ? 'true' : 'false');
if (on) b.setAttribute('data-active', '1'); else b.removeAttribute('data-active');
var lbl = b.querySelector('.mu-theme-label'); var lbl = b.querySelector('.mu-theme-label');
if (lbl) lbl.textContent = label(b.getAttribute('data-theme-mode')); if (lbl) lbl.textContent = label(b.getAttribute('data-theme-mode'));
}); });
+1 -1
View File
@@ -1 +1 @@
{"version": "2026.09.27.116"} {"version": "2026.09.27.120"}