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:
1 parent
5800a61da3
commit
eabcff197c
7 files changed
+134
-102
No files matched your search
+58
-53
@@ -19,16 +19,16 @@
|
||||
</script>
|
||||
<title>หน้าแรก | Atroute (mockup)</title>
|
||||
<!-- ฟอนต์หลัก 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) -->
|
||||
<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="./theme.css?v=2026.09.27.116" rel="stylesheet">
|
||||
<link href="./_shared.css?v=2026.09.27.116" rel="stylesheet">
|
||||
<link href="./vendor/leaflet/leaflet.css?v=2026.09.27.116" rel="stylesheet">
|
||||
<link href="./map.css?v=2026.09.27.116" rel="stylesheet">
|
||||
<meta name="app-version" content="2026.09.27.116">
|
||||
<link rel="icon" type="image/png" href="../.image/icons/minibus-512x512.png?v=2026.09.27.116">
|
||||
<link href="./theme.css?v=2026.09.27.120" rel="stylesheet">
|
||||
<link href="./_shared.css?v=2026.09.27.120" rel="stylesheet">
|
||||
<link href="./vendor/leaflet/leaflet.css?v=2026.09.27.120" rel="stylesheet">
|
||||
<link href="./map.css?v=2026.09.27.120" rel="stylesheet">
|
||||
<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.120">
|
||||
<style>
|
||||
.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; }
|
||||
@@ -87,7 +87,7 @@
|
||||
/* Topbar */
|
||||
/* z-index 1100 — ต้องสูงกว่า Leaflet (pane 400 · control 800 · .leaflet-top 1000)
|
||||
ไม่งั้นแผนที่จะบัง 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-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; }
|
||||
@@ -96,10 +96,10 @@
|
||||
.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-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: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 */
|
||||
.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>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<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">
|
||||
<script src="./imageurl.js?v=2026.09.27.116" defer></script>
|
||||
<script src="./pwa.js?v=2026.09.27.116" defer></script>
|
||||
<script src="./i18n.js?v=2026.09.27.116" defer></script>
|
||||
<script src="./analytics.js?v=2026.09.27.116" defer></script>
|
||||
<script src="./popular.js?v=2026.09.27.116" defer></script>
|
||||
<script src="./vendor/leaflet/leaflet.js?v=2026.09.27.116" defer></script>
|
||||
<script src="./map.js?v=2026.09.27.116" defer></script>
|
||||
<script src="./partials/schedules.js?v=2026.09.27.116" defer></script>
|
||||
<script src="./partials/otherStop.js?v=2026.09.27.116" defer></script>
|
||||
<script src="./motion.js?v=2026.09.27.116" defer></script>
|
||||
<script src="./router.js?v=2026.09.27.116" defer></script>
|
||||
<link rel="stylesheet" href="./responsive.css?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.120" defer></script>
|
||||
<script src="./pwa.js?v=2026.09.27.120" defer></script>
|
||||
<script src="./i18n.js?v=2026.09.27.120" defer></script>
|
||||
<script src="./theme.js?v=2026.09.27.120" defer></script>
|
||||
<script src="./analytics.js?v=2026.09.27.120" defer></script>
|
||||
<script src="./popular.js?v=2026.09.27.120" defer></script>
|
||||
<script src="./vendor/leaflet/leaflet.js?v=2026.09.27.120" defer></script>
|
||||
<script src="./map.js?v=2026.09.27.120" defer></script>
|
||||
<script src="./partials/schedules.js?v=2026.09.27.120" defer></script>
|
||||
<script src="./partials/otherStop.js?v=2026.09.27.120" defer></script>
|
||||
<script src="./motion.js?v=2026.09.27.120" defer></script>
|
||||
<script src="./router.js?v=2026.09.27.120" defer></script>
|
||||
<link rel="stylesheet" href="./responsive.css?v=2026.09.27.120">
|
||||
</head>
|
||||
<body class="main-theme-page">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display:none" aria-hidden="true">
|
||||
@@ -426,7 +427,7 @@
|
||||
<header class="mu-topbar">
|
||||
<div class="mu-container mu-topbar-inner">
|
||||
<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 class="mu-brand-title">Atroute</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>
|
||||
</div>
|
||||
</details>
|
||||
<div class="mu-lang-switch" id="lang-switch">
|
||||
<button type="button" class="mu-lang-btn" id="lang-btn" aria-haspopup="menu" aria-expanded="false"
|
||||
aria-label="ภาษา / Language" data-i18n-attr="aria-label:aria.langSwitch">
|
||||
<svg class="ic" aria-hidden="true"><use href="#ic-globe"/></svg>
|
||||
<span id="lang-label">ไทย</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>
|
||||
<div class="mu-topbar-tools">
|
||||
<div class="mu-pop" id="theme-switch">
|
||||
<button type="button" class="mu-pop-btn" id="theme-btn" aria-haspopup="menu"
|
||||
aria-expanded="false" aria-label="ธีม / Theme">
|
||||
<span id="theme-icon" aria-hidden="true"></span>
|
||||
</button>
|
||||
<button type="button" role="menuitemradio" aria-checked="false" data-i18n-switch="en">
|
||||
English <span class="mu-lang-code">EN</span>
|
||||
</button>
|
||||
<div class="mu-pop-panel" id="theme-menu" role="menu" hidden aria-label="ธีม / Theme">
|
||||
<button type="button" class="mu-pop-item" role="menuitemradio" aria-checked="false" data-theme-mode="light">
|
||||
<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 class="mu-lang-switch mu-theme-switch" id="theme-switch">
|
||||
<button type="button" class="mu-lang-btn mu-theme-btn" id="theme-btn" aria-haspopup="menu"
|
||||
aria-expanded="false" aria-label="ธีม / Theme">
|
||||
<span id="theme-icon" class="mu-theme-icon" aria-hidden="true"></span>
|
||||
</button>
|
||||
<div class="mu-lang-menu" id="theme-menu" role="menu" hidden aria-label="ธีม / Theme">
|
||||
<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>
|
||||
|
||||
<div class="mu-pop" id="lang-switch">
|
||||
<button type="button" class="mu-pop-btn mu-pop-btn-lang" id="lang-btn" aria-haspopup="menu"
|
||||
aria-expanded="false" aria-label="ภาษา / Language" data-i18n-attr="aria-label:aria.langSwitch">
|
||||
<span id="lang-label">ไทย</span>
|
||||
<svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2.5"
|
||||
stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg>
|
||||
</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>
|
||||
|
||||
<a class="mu-action-btn" href="#/check" data-i18n="cta.check">เช็กเวลาเดินรถ</a>
|
||||
</div>
|
||||
</header>
|
||||
@@ -498,7 +503,7 @@
|
||||
<div class="mu-footer-grid">
|
||||
<div class="mu-footer-brand">
|
||||
<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>
|
||||
<strong>Atroute</strong>
|
||||
<span data-i18n="brand.subtitle">สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</span>
|
||||
|
||||
Reference in new issue
Block a user