theme: dark mode + theme tokens (parity with web-at-transit)

- ui/theme.css: token set copied value-for-value from the Next app
  (--c-surface/-ink/-border/-brand/-tint/-glass + radius), light and dark blocks
- ui/theme.js: 3-mode switch (light / dark / auto=prefers-color-scheme) with a
  header dropdown, aria-haspopup/menu, Esc/outside close, live matchMedia listener
- index.html: pre-paint theme script (no flash), theme.css link before _shared.css
- remapped ~290 literal colours in _shared.css/index.html/partials to var(--c-*)
  so both projects render from the same tokens; dark patch block covers the
  remaining decorative gradients
- DESIGN.md: new section 3.2 (theme tokens + where to add colours)
- VERSION 2026.09.27.114
This commit is contained in:
Bkk1234 committed 2026-11-04 01:29:37 +07:00
1 parent bea8f0773e
commit cdfd77ffff
18 files changed
+742 -329

No files matched your search

+28 -23
View File
@@ -56,8 +56,8 @@
font-size: .72rem;
font-weight: 800;
letter-spacing: .02em;
background: rgba(255, 255, 255, .92);
color: #1f2a44;
background: var(--c-glass);
color: var(--c-ink);
backdrop-filter: blur(8px);
box-shadow: 0 4px 10px rgba(15, 23, 42, .15);
}
@@ -146,8 +146,8 @@
border-radius: 999px;
font-size: .7rem;
font-weight: 700;
background: rgba(255, 255, 255, .92);
color: #1f2a44;
background: var(--c-glass);
color: var(--c-ink);
backdrop-filter: blur(6px);
box-shadow: 0 4px 10px rgba(15, 23, 42, .14);
}
@@ -169,7 +169,7 @@
overflow: hidden;
box-shadow: 0 10px 24px rgba(63, 43, 94, .08);
border: 1px solid rgba(231, 224, 246, .95);
background: #fff;
background: var(--c-surface);
display: flex;
flex-direction: column;
transition: transform .18s ease, box-shadow .18s ease;
@@ -221,7 +221,7 @@
width: 48px;
height: 48px;
border-radius: 12px;
background: #fff;
background: var(--c-surface);
padding: 4px;
object-fit: contain;
}
@@ -273,7 +273,7 @@
.mu-footer-col ul a:hover { color: #fff; }
.mu-footer-col ul a::before {
content: "›";
color: #7a4cc0;
color: var(--c-brand-ink);
font-weight: 800;
}
.mu-footer-contact a,
@@ -311,7 +311,7 @@
gap: 12px;
}
.mu-sponsor-tile {
background: #fff;
background: var(--c-surface);
border-radius: 12px;
padding: 14px;
display: flex;
@@ -398,7 +398,7 @@ body:has(.mu-site-footer) .mu-footer { display: none; }
.mu-search-field .ic {
position: absolute;
left: 12px;
color: #6f7b95;
color: var(--c-ink-2);
pointer-events: none;
}
.mu-search-field input {
@@ -421,8 +421,8 @@ body:has(.mu-site-footer) .mu-footer { display: none; }
padding: 6px 12px;
border: 1px solid #e4dcf2;
border-radius: 999px;
background: #f0edf7;
color: #6d28d9;
background: var(--c-surface-3);
color: var(--c-brand-ink);
font-family: inherit;
font-weight: 700;
font-size: .76rem;
@@ -430,8 +430,8 @@ body:has(.mu-site-footer) .mu-footer { display: none; }
cursor: pointer;
transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.mu-lang-btn:hover { color: #5b21b6; border-color: #d9cdf0; }
.mu-lang-btn[aria-expanded="true"] { background: #fff; border-color: #cbb8ea; }
.mu-lang-btn:hover { color: var(--c-brand-ink); border-color: var(--c-border); }
.mu-lang-btn[aria-expanded="true"] { background: var(--c-surface); border-color: #cbb8ea; }
.mu-lang-btn .ic { width: 15px; height: 15px; }
.mu-lang-caret {
width: 0 !important;
@@ -449,8 +449,8 @@ body:has(.mu-site-footer) .mu-footer { display: none; }
z-index: 1200;
min-width: 168px;
padding: 6px;
background: #fff;
border: 1px solid #e7e0f6;
background: var(--c-surface);
border: 1px solid var(--c-border);
border-radius: 12px;
box-shadow: 0 10px 28px rgba(15, 23, 42, .14);
}
@@ -465,7 +465,7 @@ body:has(.mu-site-footer) .mu-footer { display: none; }
border: 0;
border-radius: 8px;
background: transparent;
color: #2c3550;
color: var(--c-ink);
font-family: inherit;
font-size: .84rem;
font-weight: 600;
@@ -473,14 +473,19 @@ body:has(.mu-site-footer) .mu-footer { display: none; }
cursor: pointer;
}
.mu-lang-menu button:hover { background: #f6f2ff; }
.mu-lang-menu button[aria-checked="true"] { color: #7a4cc0; font-weight: 800; background: #f4f0fb; }
.mu-lang-menu button[aria-checked="true"] { color: var(--c-brand-ink); font-weight: 800; background: var(--c-brand-soft); }
.mu-lang-menu button .mu-lang-code {
margin-left: auto;
font-family: ui-monospace, "IBM Plex Mono", monospace;
font-size: .72rem;
color: #8a93a8;
color: var(--c-ink-3);
}
/* ---------- ปุ่มธีม (dropdown 3 โหมด — สว่าง / มืด / ตามอุปกรณ์) ---------- */
.mu-theme-btn { padding: 6px 9px; }
.mu-theme-icon { display: inline-flex; }
.mu-theme-icon svg { width: 16px; height: 16px; }
/* ============================================================
ปุ่ม + ฟอร์มคอนโทรล (shared — ทุกหน้าใช้ร่วมกัน)
.mu-btn อยู่ที่นี่ (ไม่ใช่ใน partial) → หน้าไหนก็ได้สไตล์เดียวกัน
@@ -510,18 +515,18 @@ body:has(.mu-site-footer) .mu-footer { display: none; }
}
.mu-btn.primary:hover { box-shadow: 0 10px 22px rgba(124, 58, 237, .35); }
.mu-btn.ghost {
background: #fff;
border-color: #e7e2f6;
color: #7a4cc0;
background: var(--c-surface);
border-color: var(--c-border);
color: var(--c-brand-ink);
box-shadow: 0 2px 8px rgba(63, 43, 94, .05);
}
.mu-btn.ghost:hover { border-color: #d8c9f2; background: #faf7ff; }
.mu-btn.ghost:hover { border-color: #d8c9f2; background: var(--c-surface-2); }
/* select แบบโมเดิร์น — custom chevron แทนลูกศร native (prefix #view ชนะ partial style) */
#view .mu-toolbar select {
appearance: none;
-webkit-appearance: none;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237a4cc0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"), linear-gradient(180deg, #fff, #f8fbff);
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237a4cc0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"), linear-gradient(180deg, var(--c-surface), #f8fbff);
background-repeat: no-repeat;
background-position: right 12px center;
padding-right: 38px;
+113 -81
View File
@@ -3,19 +3,34 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<script>
/* ตั้งธีมก่อน paint — ต้องตรงกับ ui/theme.js (light | dark | auto=อุปกรณ์) */
(function () {
try {
var m = localStorage.getItem('at_theme') || 'auto';
var dark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
var r = m === 'auto' ? (dark ? 'dark' : 'light') : m;
var h = document.documentElement;
h.dataset.theme = r;
h.dataset.themeMode = m;
h.style.colorScheme = r;
} catch (e) {}
})();
</script>
<title>หน้าแรก | Atroute (mockup)</title>
<!-- ฟอนต์หลัก K2D: ไฟล์ในโปรเจกต์ (ui/vendor/fonts/) — ทำงานออฟไลน์ได้ -->
<link href="./vendor/fonts/k2d.css?v=2026.09.27.109" rel="stylesheet">
<link href="./vendor/fonts/k2d.css?v=2026.09.27.115" 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="./_shared.css?v=2026.09.27.109" rel="stylesheet">
<link href="./vendor/leaflet/leaflet.css?v=2026.09.27.109" rel="stylesheet">
<link href="./map.css?v=2026.09.27.109" rel="stylesheet">
<meta name="app-version" content="2026.09.27.109">
<link rel="icon" type="image/png" href="../.image/icons/minibus-512x512.png?v=2026.09.27.109">
<link href="./theme.css?v=2026.09.27.115" rel="stylesheet">
<link href="./_shared.css?v=2026.09.27.115" rel="stylesheet">
<link href="./vendor/leaflet/leaflet.css?v=2026.09.27.115" rel="stylesheet">
<link href="./map.css?v=2026.09.27.115" rel="stylesheet">
<meta name="app-version" content="2026.09.27.115">
<link rel="icon" type="image/png" href="../.image/icons/minibus-512x512.png?v=2026.09.27.115">
<style>
.mu-card.empty { width: 100%; padding: 16px; text-align: center; color: #6f7b95; 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; }
/* Page-specific: hero */
@@ -43,10 +58,10 @@
letter-spacing: .02em;
}
/* zone tint — พื้นหลังการ์ดตามหมวดเส้นทาง (ตัวการ์ด = เฉดอ่อน / หัวการ์ด = เฉดสด) */
.mu-zone:has(.tag-sky) { --zone-tint: #eff6ff; }
.mu-zone:has(.tag-purple) { --zone-tint: #f5f3ff; }
.mu-zone:has(.tag-pink) { --zone-tint: #fdf2f8; }
.mu-zone:has(.tag-yellow) { --zone-tint: #fffbeb; }
.mu-zone:has(.tag-sky) { --zone-tint: var(--c-tint-cyan); }
.mu-zone:has(.tag-purple) { --zone-tint: var(--c-tint-purple); }
.mu-zone:has(.tag-pink) { --zone-tint: var(--c-tint-pink); }
.mu-zone:has(.tag-yellow) { --zone-tint: var(--c-tint-amber); }
.mu-zone .mu-card,
.mu-zone .mu-route-info { background: var(--zone-tint, #fff); }
@@ -56,46 +71,46 @@
.mu-zone:has(.tag-yellow) .mu-card-head { background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%); }
/* การ์ดที่ยังไม่มีข้อมูล (is-empty): พื้นเทา + N/A แทนเลขสาย ไม่มีเงาตัวอักษร */
.mu-card.is-empty,
.mu-card.is-empty .mu-route-info { background: #f0f2f5; }
.mu-card.is-empty .mu-card-head { background: #e4e7eb; }
.mu-card.is-empty .mu-route-number { color: #5b636e !important; text-shadow: none !important; font-size: 42px !important; }
.mu-card.is-empty .mu-route-info { background: var(--c-surface-3); }
.mu-card.is-empty .mu-card-head { background: var(--c-surface-3); }
.mu-card.is-empty .mu-route-number { color: var(--c-ink-2) !important; text-shadow: none !important; font-size: 42px !important; }
.mu-card.is-empty { cursor: default; }
.mu-card.is-empty:hover { transform: none; box-shadow: 0 4px 14px rgba(20,40,90,.06); }
.mu-route-info { padding: 14px 16px 16px; background: #fff; }
.mu-route-name { margin: 0 0 10px; font-size: .95rem; color: #1f2a44; font-weight: 700; }
.mu-route-info { padding: 14px 16px 16px; background: var(--c-surface); }
.mu-route-name { margin: 0 0 10px; font-size: .95rem; color: var(--c-ink); font-weight: 700; }
/* ===== maintheme.png look: topbar, hero, zones, grid, summary, footer ===== */
body.main-theme-page { margin: 0; font-family: 'K2D','Noto Sans Thai','Prompt',system-ui,sans-serif; color: #1f2a44; background: #f7f9fd; }
body.main-theme-page { margin: 0; font-family: 'K2D','Noto Sans Thai','Prompt',system-ui,sans-serif; color: var(--c-ink); background: var(--c-bg); }
.mu-container { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
/* Topbar */
/* z-index 1100 — ต้องสูงกว่า Leaflet (pane 400 · control 800 · .leaflet-top 1000)
ไม่งั้นแผนที่จะบัง nav ตอนเลื่อน */
.mu-topbar { background: #ffffff; 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 #e9eef7; 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; }
.mu-brand:hover .mu-logo-img { transform: scale(1.06); }
.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-brand-title { display: block; margin: 0; font-weight: 800; font-size: 1.05rem; color: var(--c-ink); transition: color .15s ease; }
.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: #4a5876; 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: .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:hover { color: #1f2a44; }
.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); }
/* 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-map { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .3; filter: saturate(1.1); z-index: 0; pointer-events: none; }
.mu-blob { position: absolute; border-radius: 50%; filter: blur(50px); opacity: .55; z-index: 0; }
.mu-blob.one { width: 220px; height: 220px; background: #b794f4; top: -50px; left: 8%; }
.mu-blob.two { width: 260px; height: 260px; background: #f9a8d4; top: 40%; right: 8%; }
.mu-blob.three{ width: 180px; height: 180px; background: #fde68a; bottom: -40px; left: 38%; }
.mu-blob.one { width: 220px; height: 220px; background: var(--c-tint-purple); top: -50px; left: 8%; }
.mu-blob.two { width: 260px; height: 260px; background: var(--c-tint-pink); top: 40%; right: 8%; }
.mu-blob.three{ width: 180px; height: 180px; background: var(--c-tint-amber); bottom: -40px; left: 38%; }
.mu-hero-content { position: relative; z-index: 1; }
.mu-badge { display: inline-block; background: rgba(255,255,255,.7); backdrop-filter: blur(6px); color: #6d28d9; padding: 6px 16px; border-radius: 999px; font-size: .82rem; font-weight: 700; margin-bottom: 18px; box-shadow: 0 4px 10px rgba(124,58,237,.12); }
.mu-hero h1 { margin: 0 0 26px; font-size: 2.2rem; font-weight: 800; line-height: 1.35; color: #1f2a44; }
.mu-badge { display: inline-block; background: var(--c-glass-24); backdrop-filter: blur(6px); color: var(--c-brand-ink); padding: 6px 16px; border-radius: 999px; font-size: .82rem; font-weight: 700; margin-bottom: 18px; box-shadow: 0 4px 10px rgba(124,58,237,.12); }
.mu-hero h1 { margin: 0 0 26px; font-size: 2.2rem; font-weight: 800; line-height: 1.35; color: var(--c-ink); }
.mu-gradient-text { background: linear-gradient(120deg, #d946ef 10%, #a855f7 60%, #6366f1 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
/* ===== Route selector: จังหวัด → สถานีขนส่งผู้โดยสาร (cascade) ===== */
.mu-route-selector {
@@ -116,7 +131,7 @@
margin: 0 0 7px 8px;
font-size: .8rem;
font-weight: 700;
color: #6f7b95;
color: var(--c-ink-2);
letter-spacing: .01em;
}
.mu-select-field > label svg { width: 15px; height: 15px; color: #8b5cf6; flex: none; }
@@ -124,8 +139,8 @@
position: relative;
display: flex;
align-items: center;
background: #fff;
border: 1px solid #e7e2f6;
background: var(--c-surface);
border: 1px solid var(--c-border);
border-radius: 14px;
box-shadow: 0 8px 20px rgba(63, 43, 94, .08);
transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
@@ -142,7 +157,7 @@
font-family: inherit;
font-size: .95rem;
font-weight: 600;
color: #1f2a44;
color: var(--c-ink);
padding: 14px 12px;
cursor: pointer;
appearance: none;
@@ -150,8 +165,8 @@
}
.mu-select-box .mu-select-chevron { width: 18px; height: 18px; margin-right: 14px; color: #8b5cf6; flex: none; pointer-events: none; }
.mu-select-arrow { display: none; align-self: center; color: #c4b5e6; font-weight: 700; font-size: 1.15rem; padding-bottom: 18px; }
.mu-select-hint { margin: 12px 0 0; font-size: .84rem; color: #6f7b95; min-height: 1.25em; }
.mu-select-hint b { color: #7a4cc0; font-weight: 700; }
.mu-select-hint { margin: 12px 0 0; font-size: .84rem; color: var(--c-ink-2); min-height: 1.25em; }
.mu-select-hint b { color: var(--c-brand-ink); font-weight: 700; }
/* ===== Hero actions ===== */
.mu-hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }
@@ -161,9 +176,9 @@
gap: 7px;
padding: 11px 20px;
border-radius: 999px;
background: #fff;
border: 1px solid #e7e2f6;
color: #5b3b71;
background: var(--c-surface);
border: 1px solid var(--c-border);
color: var(--c-ink-2);
text-decoration: none;
font-size: .88rem;
font-weight: 700;
@@ -182,24 +197,24 @@
.mu-zone { margin-bottom: 32px; }
.mu-zone-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 14px; }
.mu-zone-tag { padding: 5px 14px; border-radius: 999px; font-size: .82rem; font-weight: 700; }
.mu-zone-tag.tag-sky { background: #dbeafe; color: #1d4ed8; }
.mu-zone-tag.tag-pink { background: #fce7f3; color: #be185d; }
.mu-zone-tag.tag-purple { background: #ede9fe; color: #6d28d9; }
.mu-zone-tag.tag-yellow { background: #fdf1d3; color: #8a6100; }
.mu-zone-tag.tag-sky { background: var(--c-tint-cyan); color: var(--c-info); }
.mu-zone-tag.tag-pink { background: var(--c-tint-pink); color: var(--c-danger); }
.mu-zone-tag.tag-purple { background: var(--c-tint-purple); color: var(--c-brand-ink); }
.mu-zone-tag.tag-yellow { background: var(--c-tint-amber); color: var(--c-warn); }
/* คำอธิบายสีการ์ดตามหมวดเส้นทาง */
.mu-legend { background: #fff; border: 1px solid #e9eef7; border-radius: 14px; padding: 16px 18px; margin-bottom: 26px; box-shadow: 0 4px 14px rgba(20,40,90,.05); }
.mu-legend-title { margin: 0 0 12px; font-size: .95rem; font-weight: 800; color: #1f2a44; }
.mu-legend { background: var(--c-surface); border: 1px solid #e9eef7; border-radius: 14px; padding: 16px 18px; margin-bottom: 26px; box-shadow: 0 4px 14px rgba(20,40,90,.05); }
.mu-legend-title { margin: 0 0 12px; font-size: .95rem; font-weight: 800; color: var(--c-ink); }
.mu-legend-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 18px; }
.mu-legend-list li { display: flex; align-items: center; gap: 9px; font-size: .86rem; color: #3d4a63; }
.mu-legend-list li { display: flex; align-items: center; gap: 9px; font-size: .86rem; color: var(--c-ink-2); }
.mu-legend-list .sw { width: 26px; height: 16px; border-radius: 4px; flex: none; border: 1px solid rgba(20,40,90,.12); }
.sw-bangkok { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.sw-interprov { background: linear-gradient(135deg, #8b5cf6, #c084fc); }
.sw-inprov { background: linear-gradient(135deg, #ec4899, #f472b6); }
.sw-municipal { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.sw-empty { background: #e4e7eb; }
.mu-legend-note { margin: 12px 0 0; color: #6f7b95; font-size: .82rem; }
.mu-zone-sub, .mu-zone-desc { color: #6f7b95; font-size: .88rem; margin: 0; }
.sw-empty { background: var(--c-surface-3); }
.mu-legend-note { margin: 12px 0 0; color: var(--c-ink-2); font-size: .82rem; }
.mu-zone-sub, .mu-zone-desc { color: var(--c-ink-2); font-size: .88rem; margin: 0; }
/* ทุกบรรทัดคำอธิบายกินเต็มความกว้างของตัวเอง — ไม่ถูกบีบไปรวมแถวเดียวกับป้ายหัวข้อ
(เดิม flex ไม่มี wrap → ทุกบรรทัดถูกย่อรวมกันหมด ข้อความไทยจึงตัดคำมั่ว) */
.mu-zone-head .mu-zone-desc { flex-basis: 100%; min-width: 0; line-height: 1.65; }
@@ -210,41 +225,41 @@
.mu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
/* Cards */
.mu-card { display: block; text-decoration: none; color: inherit; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 14px rgba(20,40,90,.06); transition: transform .15s, box-shadow .15s; }
.mu-card { display: block; text-decoration: none; color: inherit; background: var(--c-surface); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 14px rgba(20,40,90,.06); transition: transform .15s, box-shadow .15s; }
.mu-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,40,90,.1); }
.mu-card-head { aspect-ratio: auto !important; height: 130px !important; display: flex !important; align-items: center; justify-content: center; position: relative; }
.mu-card-head::after { display: none !important; }
.mu-card-head .mu-route-number { position: static !important; color: #fff !important; font-size: 52px !important; font-weight: 900; text-shadow: 0 4px 12px rgba(0,0,0,.2) !important; letter-spacing: .02em; margin: 0; }
.mu-route-info { padding: 14px 14px 14px; }
.mu-route-name { margin: 0 0 10px; font-size: .9rem; color: #1f2a44; font-weight: 700; }
.mu-card .mu-badge { background: #dcfce7; color: #15803d; padding: 4px 10px; font-size: .78rem; font-weight: 700; box-shadow: none; backdrop-filter: none; }
.mu-next-trip { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: #dcfce7; color: #15803d; }
.badge-purple { background: #ede9fe; color: #6d28d9; }
.badge-sky { background: #dbeafe; color: #1d4ed8; }
.badge-pink { background: #fce7f3; color: #be185d; }
.badge-mint { background: #d1fae5; color: #047857; }
.badge-gray { background: #e8eaed; color: #5b636e; }
.mu-route-name { margin: 0 0 10px; font-size: .9rem; color: var(--c-ink); font-weight: 700; }
.mu-card .mu-badge { background: var(--c-tint-green); color: var(--c-ok); padding: 4px 10px; font-size: .78rem; font-weight: 700; box-shadow: none; backdrop-filter: none; }
.mu-next-trip { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--c-tint-green); color: var(--c-ok); }
.badge-purple { background: var(--c-tint-purple); color: var(--c-brand-ink); }
.badge-sky { background: var(--c-tint-cyan); color: var(--c-info); }
.badge-pink { background: var(--c-tint-pink); color: var(--c-danger); }
.badge-mint { background: var(--c-tint-green); color: var(--c-ok); }
.badge-gray { background: var(--c-surface-3); color: var(--c-ink-2); }
.mu-route-chip-wrap { display:flex; gap: 8px; }
/* Summary stats */
.mu-summary { padding: 20px 0 40px; }
.mu-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.mu-stat { padding: 28px 18px; text-align: center; border-radius: 18px; font-weight: 700; margin: 0; }
.mu-stat h3 { margin: 0 0 4px; font-size: 2rem; color: #1f2a44; font-weight: 800; }
.mu-stat p { margin: 0; font-size: .82rem; color: #4a5876; font-weight: 600; }
.mu-stat.tag-pink { background: #fce7f3; }
.mu-stat.tag-sky { background: #dbeafe; }
.mu-stat.tag-purple { background: #ede9fe; }
.mu-stat.tag-mint { background: #d1fae5; }
.mu-stat h3 { margin: 0 0 4px; font-size: 2rem; color: var(--c-ink); font-weight: 800; }
.mu-stat p { margin: 0; font-size: .82rem; color: var(--c-ink-2); font-weight: 600; }
.mu-stat.tag-pink { background: var(--c-tint-pink); }
.mu-stat.tag-sky { background: var(--c-tint-cyan); }
.mu-stat.tag-purple { background: var(--c-tint-purple); }
.mu-stat.tag-mint { background: var(--c-tint-green); }
/* ===== Footer bottom bar ===== */
.mu-footer-bottom { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
/* ===== Sponsor marquee (between hero and main) ===== */
.mu-sponsor-marquee { padding: 26px 0 6px; background: #fff; border-bottom: 1px solid #f0f2f8; }
.mu-sponsor-marquee { padding: 26px 0 6px; background: var(--c-surface); border-bottom: 1px solid #f0f2f8; }
.mu-sponsor-head { text-align: center; margin-bottom: 18px; }
.mu-sponsor-head h4 { margin: 0 0 4px; font-size: 1rem; font-weight: 800; color: #1f2a44; letter-spacing: .01em; }
.mu-sponsor-head .lead { margin: 0; color: #6f7b95; font-size: .84rem; }
.mu-sponsor-head h4 { margin: 0 0 4px; font-size: 1rem; font-weight: 800; color: var(--c-ink); letter-spacing: .01em; }
.mu-sponsor-head .lead { margin: 0; color: var(--c-ink-2); font-size: .84rem; }
.mu-marquee {
overflow: hidden;
position: relative;
@@ -272,7 +287,7 @@
display: flex;
align-items: center;
justify-content: center;
background: #fff;
background: var(--c-surface);
border: 1px solid #eef0f6;
border-radius: 14px;
box-shadow: 0 4px 12px rgba(63, 43, 94, .05);
@@ -305,19 +320,19 @@
</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.109">
<script src="./imageurl.js?v=2026.09.27.109" defer></script>
<script src="./pwa.js?v=2026.09.27.109" defer></script>
<script src="./i18n.js?v=2026.09.27.109" defer></script>
<script src="./analytics.js?v=2026.09.27.109" defer></script>
<script src="./popular.js?v=2026.09.27.109" defer></script>
<script src="./vendor/leaflet/leaflet.js?v=2026.09.27.109" defer></script>
<script src="./map.js?v=2026.09.27.109" defer></script>
<script src="./partials/schedules.js?v=2026.09.27.109" defer></script>
<script src="./partials/otherStop.js?v=2026.09.27.109" defer></script>
<script src="./motion.js?v=2026.09.27.109" defer></script>
<script src="./router.js?v=2026.09.27.109" defer></script>
<link rel="stylesheet" href="./responsive.css?v=2026.09.27.109">
<link rel="apple-touch-icon" href="../.image/icons/minibus-192x192.png?v=2026.09.27.115">
<script src="./imageurl.js?v=2026.09.27.115" defer></script>
<script src="./pwa.js?v=2026.09.27.115" defer></script>
<script src="./i18n.js?v=2026.09.27.115" defer></script>
<script src="./analytics.js?v=2026.09.27.115" defer></script>
<script src="./popular.js?v=2026.09.27.115" defer></script>
<script src="./vendor/leaflet/leaflet.js?v=2026.09.27.115" defer></script>
<script src="./map.js?v=2026.09.27.115" defer></script>
<script src="./partials/schedules.js?v=2026.09.27.115" defer></script>
<script src="./partials/otherStop.js?v=2026.09.27.115" defer></script>
<script src="./motion.js?v=2026.09.27.115" defer></script>
<script src="./router.js?v=2026.09.27.115" defer></script>
<link rel="stylesheet" href="./responsive.css?v=2026.09.27.115">
</head>
<body class="main-theme-page">
<svg xmlns="http://www.w3.org/2000/svg" style="display:none" aria-hidden="true">
@@ -411,7 +426,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.109" alt="Atroute logo" width="44" height="44" decoding="async">
<img class="mu-logo-img" src="../.image/icons/minibus-512x512.png?v=2026.09.27.115" 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>
@@ -455,6 +470,23 @@
</button>
</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>
</button>
</div>
</div>
<a class="mu-action-btn" href="#/check" data-i18n="cta.check">เช็กเวลาเดินรถ</a>
</div>
</header>
@@ -466,7 +498,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.109" alt="Atroute">
<img src="../.image/icons/minibus-512x512.png?v=2026.09.27.115" alt="Atroute">
<div>
<strong>Atroute</strong>
<span data-i18n="brand.subtitle">สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</span>
+26 -26
View File
@@ -21,12 +21,12 @@
.at-map .leaflet-control-zoom a {
border-radius: 4px;
border: 1px solid #ddd5c0;
background: #fffdf6;
color: #14211a;
background: var(--c-tint-amber);
color: var(--c-ink);
font-weight: 700;
box-shadow: none;
}
.at-map .leaflet-control-zoom a:hover { background: #e4efe4; color: #14532d; }
.at-map .leaflet-control-zoom a:hover { background: #e4efe4; color: var(--c-ok); }
.at-map .leaflet-bar { border: 0; box-shadow: none; }
/* attribution — เล็ก อ่านได้ ไม่ทับข้อมูล */
@@ -52,18 +52,18 @@
/* ป้ายที่กำลังเปิดดูอยู่ — ใหญ่กว่าเพื่อให้เห็นชัด */
.at-pin.here { background: #f2a900; width: 18px; height: 18px; border-width: 3px; }
/* จุดย่อย (จุดขึ้นรถประจำทางอื่นๆ) — สี่เหลี่ยมม่วง ต่างจากหมุดกลม */
.at-pin.sub { background: #7a4cc0; border-radius: 2px; }
.at-pin.sub { background: var(--c-brand); border-radius: 2px; }
.at-map .leaflet-tooltip {
border-radius: 4px;
border: 1px solid #ddd5c0;
background: #fffdf6;
color: #14211a;
background: var(--c-tint-amber);
color: var(--c-ink);
box-shadow: none;
font-size: .78rem;
padding: 5px 8px;
}
.at-map .leaflet-tooltip b { color: #14532d; }
.at-map .leaflet-tooltip b { color: var(--c-ok); }
/* ---------- legend (มุมซ้ายล่าง) ---------- */
.at-legend {
@@ -75,7 +75,7 @@
border-radius: 4px;
padding: 7px 10px;
font-size: .74rem;
color: #14211a;
color: var(--c-ink);
line-height: 1.65;
pointer-events: none;
}
@@ -94,8 +94,8 @@
color: #6b7268;
font-size: .82rem;
}
.at-map-caption b { color: #14211a; }
.at-map-caption .at-offline { color: #8a6100; }
.at-map-caption b { color: var(--c-ink); }
.at-map-caption .at-offline { color: var(--c-warn); }
@media (min-width: 768px) {
.at-map { height: 380px; }
@@ -105,45 +105,45 @@
.at-map .leaflet-popup-content-wrapper {
border-radius: 4px;
border: 1px solid #ddd5c0;
background: #fffdf6;
background: var(--c-tint-amber);
box-shadow: none;
color: #14211a;
color: var(--c-ink);
}
.at-map .leaflet-popup-tip { background: #fffdf6; box-shadow: none; }
.at-map .leaflet-popup-tip { background: var(--c-tint-amber); box-shadow: none; }
.at-map .leaflet-popup-content { margin: 10px 12px; font-size: .8rem; }
.at-pop { display: flex; flex-direction: column; gap: 3px; min-width: 150px; }
.at-pop b { font-size: .86rem; color: #14532d; }
.at-pop b { font-size: .86rem; color: var(--c-ok); }
.at-pop span { color: #6b7268; }
.at-pop a { margin-top: 4px; color: #14532d; font-weight: 700; text-decoration: none; border-bottom: 1px solid #1f7a3d; align-self: flex-start; }
.at-pop a:hover { color: #1f7a3d; }
.at-pop a { margin-top: 4px; color: var(--c-ok); font-weight: 700; text-decoration: none; border-bottom: 1px solid #1f7a3d; align-self: flex-start; }
.at-pop a:hover { color: var(--c-ok); }
/* ---------- รายการจุดจอดตามเส้นทาง + กม. จากต้นทาง ---------- */
.at-km-wrap { margin-top: 14px; border-top: 1px solid #ddd5c0; padding-top: 12px; }
.at-km-wrap > h3 { margin: 0 0 8px; font-size: .9rem; font-weight: 800; color: #14211a; }
.at-km-wrap > h3 { margin: 0 0 8px; font-size: .9rem; font-weight: 800; color: var(--c-ink); }
.at-km-wrap ul { list-style: none; margin: 0; padding: 0; }
.at-km-wrap li + li { border-top: 1px dashed #ddd5c0; }
.at-km-row { display: flex; align-items: center; gap: 9px; padding: 7px 2px; text-decoration: none; color: #14211a; font-size: .86rem; }
.at-km-row:hover .at-km-name { color: #1f7a3d; text-decoration: underline; }
.at-km-row { display: flex; align-items: center; gap: 9px; padding: 7px 2px; text-decoration: none; color: var(--c-ink); font-size: .86rem; }
.at-km-row:hover .at-km-name { color: var(--c-ok); text-decoration: underline; }
.at-km-dot { width: 9px; height: 9px; border-radius: 3px; background: #f2a900; flex: none; }
.at-km-name { flex: 1; font-weight: 600; }
.at-km-val { font-variant-numeric: tabular-nums; font-weight: 700; color: #14532d; }
.at-km-val { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--c-ok); }
/* จุดจอดที่ไม่มีหน้ารายละเอียด (มาจาก 8 other_stop.json) — ไม่ใช่ลิงก์ */
.at-km-row.is-plain { cursor: default; }
.at-km-row.is-plain .at-km-dot { background: #7a4cc0; }
.at-km-row.is-sub .at-km-dot { background: #7a4cc0; } /* จุดย่อย (จุดขึ้นรถอื่นๆ) — ม่วง ให้ตรงกับหมุดบนแผนที่ */
.at-km-row.is-plain .at-km-dot { background: var(--c-brand); }
.at-km-row.is-sub .at-km-dot { background: var(--c-brand); } /* จุดย่อย (จุดขึ้นรถอื่นๆ) — ม่วง ให้ตรงกับหมุดบนแผนที่ */
.at-km-row.is-plain:hover .at-km-name { color: inherit; text-decoration: none; }
.at-km-row .at-km-val.is-off { color: #a3560f; font-weight: 600; font-size: .78rem; }
/* ---------- ป้ายใกล้ฉัน ---------- */
.at-near-msg { margin: 14px 0 0; color: #6b7268; font-size: .86rem; }
.at-near-err { color: #8a6100; }
.at-near-err { color: var(--c-warn); }
.at-near-list { list-style: none; margin: 12px 0 0; padding: 0; }
.at-near-list li + li { border-top: 1px dashed #ddd5c0; }
.at-near-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 2px; text-decoration: none; color: #14211a; align-items: center; }
.at-near-row:hover .at-near-name { color: #1f7a3d; text-decoration: underline; }
.at-near-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 2px; text-decoration: none; color: var(--c-ink); align-items: center; }
.at-near-row:hover .at-near-name { color: var(--c-ok); text-decoration: underline; }
.at-near-name { font-weight: 700; font-size: .9rem; }
.at-near-meta { grid-column: 1; color: #6b7268; font-size: .76rem; }
.at-near-dist { grid-column: 2; grid-row: 1 / span 2; font-variant-numeric: tabular-nums; font-weight: 800; color: #14532d; white-space: nowrap; }
.at-near-dist { grid-column: 2; grid-row: 1 / span 2; font-variant-numeric: tabular-nums; font-weight: 800; color: var(--c-ok); white-space: nowrap; }
/* ---------- กัน CSS ภายนอกทำลายขนาด SVG ของ Leaflet ----------
responsive.css ตั้ง `img, svg, video { max-width: 100%; height: auto; }` และบาง partial
+5 -5
View File
@@ -3,7 +3,7 @@
.mu-hero-lead {
margin: 14px auto 0;
max-width: 640px;
color: #5b3b71;
color: var(--c-ink-2);
font-size: .95rem;
}
@@ -15,7 +15,7 @@
grid-template-columns: 1fr;
gap: 16px;
align-items: center;
background: #fff;
background: var(--c-surface);
border: 1px solid #ebe8f4;
border-radius: 18px;
padding: 16px;
@@ -31,11 +31,11 @@
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 h2 { margin: 0 0 10px; font-size: 1.2rem; color: var(--c-ink); font-weight: 800; line-height: 1.35; }
.mu-about-block p { margin: 0 0 10px; color: var(--c-ink-2); 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-skeleton { color: var(--c-ink-2); 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; } }
+35 -35
View File
@@ -3,7 +3,7 @@
.mu-hero-lead {
margin: 14px auto 0;
max-width: 640px;
color: #5b3b71;
color: var(--c-ink-2);
font-size: .95rem;
}
@@ -17,12 +17,12 @@
gap: 12px;
margin-bottom: 18px;
}
.mu-blog-count { margin: 0; color: #6f7b95; font-size: .88rem; }
.mu-blog-count { margin: 0; color: var(--c-ink-2); font-size: .88rem; }
.mu-view-switch {
margin-left: auto;
display: inline-flex;
gap: 2px;
background: #f0edf7;
background: var(--c-surface-3);
border: 1px solid #e4dcf2;
border-radius: 999px;
padding: 3px;
@@ -33,7 +33,7 @@
gap: 6px;
border: 0;
background: transparent;
color: #6d28d9;
color: var(--c-brand-ink);
font-family: inherit;
font-weight: 700;
font-size: .8rem;
@@ -44,7 +44,7 @@
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.active { background: var(--c-surface); color: var(--c-brand-ink); box-shadow: 0 1px 4px rgba(63, 43, 94, .18); }
.mu-view-btn:focus-visible { outline: 2px solid #7a4cc0; outline-offset: 2px; }
/* --- โหมดตาราง (grid) --- */
@@ -56,7 +56,7 @@
.mu-blog-card {
display: flex;
flex-direction: column;
background: #fff;
background: var(--c-surface);
border: 1px solid #ebe8f4;
border-radius: 18px;
overflow: hidden;
@@ -70,11 +70,11 @@
.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 { display: flex; align-items: center; gap: 8px; color: var(--c-ink-2); 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; }
.mu-blog-card h2 { margin: 0; font-size: 1.02rem; color: var(--c-ink); font-weight: 800; line-height: 1.4; }
.mu-blog-excerpt { margin: 0; color: var(--c-ink-2); 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: var(--c-brand-ink); font-weight: 700; font-size: .85rem; }
/* --- โหมดรายการ (list) --- */
#blog-list.mode-list { display: flex; flex-direction: column; gap: 14px; }
@@ -83,7 +83,7 @@
grid-template-columns: 108px 1fr;
gap: 14px;
align-items: center;
background: #fff;
background: var(--c-surface);
border: 1px solid #ebe8f4;
border-radius: 16px;
padding: 12px;
@@ -100,14 +100,14 @@
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 h2 { margin: 4px 0 6px; font-size: .98rem; color: var(--c-ink); 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-empty { color: var(--c-ink-2); 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 { background: var(--c-surface); 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; }
/* --- แผนที่เส้นทางแทนรูปปก (textN.json → "map") --- */
@@ -129,7 +129,7 @@
display: inline-flex; align-items: center; gap: 6px;
padding: 5px 10px; border-radius: 999px;
font-size: .72rem; font-weight: 800; letter-spacing: .02em;
background: rgba(255, 255, 255, .92); color: #1f2a44;
background: var(--c-glass); color: var(--c-ink);
backdrop-filter: blur(8px);
box-shadow: 0 4px 10px rgba(15, 23, 42, .15);
pointer-events: none;
@@ -138,7 +138,7 @@
.blog-mapx-legend { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.blog-mapx-group {
margin: 10px 0 2px; font-size: .78rem; font-weight: 700; letter-spacing: .01em;
color: #7a4cc0; list-style: none;
color: var(--c-brand-ink); list-style: none;
}
.blog-mapx-group:first-child { margin-top: 0; }
.blog-mapx-group::before { content: ''; display: inline-block; width: 14px; height: 2px;
@@ -146,27 +146,27 @@
.blog-mapx-row {
display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
padding: 9px 11px; border: 1px solid #e8e4f2; border-radius: 12px;
background: #fff; cursor: pointer; font-size: .88rem; color: #3d4a63;
background: var(--c-surface); cursor: pointer; font-size: .88rem; color: var(--c-ink-2);
}
.blog-mapx-row:hover { border-color: #cbb8e8; background: #faf8ff; }
.blog-mapx-row.is-on { border-color: #7a4cc0; background: #f6f2ff; }
.blog-mapx-row.is-on { border-color: var(--c-brand); background: #f6f2ff; }
.blog-mapx-row:focus-visible { outline: 2px solid #7a4cc0; outline-offset: 1px; }
.blog-mapx-sw { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.blog-mapx-nm { font-weight: 700; color: #1f2a44; }
.blog-mapx-nm { font-weight: 700; color: var(--c-ink); }
.blog-mapx-ds { color: #6b7a94; }
.blog-mapx-ds::before { content: '\00b7'; margin-right: 6px; color: #c9c2dc; }
.blog-mapx-badge {
margin-left: auto; font-size: .72rem; padding: 2px 8px; border-radius: 999px;
background: #fdf4e3; color: #8a6100; border: 1px solid #f0dfb8;
background: #fdf4e3; color: var(--c-warn); border: 1px solid #f0dfb8;
}
.blog-mapx-panel { margin-top: 10px; padding: 12px 14px; border: 1px solid #e8e4f2; border-radius: 14px; background: #fbfaff; }
.blog-mapx-panel { margin-top: 10px; padding: 12px 14px; border: 1px solid #e8e4f2; border-radius: 14px; background: var(--c-surface-2); }
.blog-mapx-panel[hidden] { display: none; }
.blog-mapx-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.blog-mapx-head strong { color: #1f2a44; font-size: .95rem; }
.blog-mapx-head strong { color: var(--c-ink); font-size: .95rem; }
.blog-mapx-line { margin: 4px 0; font-size: .85rem; color: #6b7a94; }
.blog-mapx-line span::after { content: ':'; margin-right: 6px; }
.blog-mapx-line b { color: #1f2a44; font-weight: 600; }
.blog-mapx-facts { margin: 8px 0 0; font-size: .82rem; color: #7a4cc0; font-weight: 700; }
.blog-mapx-line b { color: var(--c-ink); font-weight: 600; }
.blog-mapx-facts { margin: 8px 0 0; font-size: .82rem; color: var(--c-brand-ink); font-weight: 700; }
.blog-mapx-hint { margin: 8px 0 0; font-size: .8rem; color: #8b93a7; }
.blog-mapx-src { margin: 0 0 14px; font-size: .78rem; color: #8b93a7; word-break: break-all; }
.at-tip-org { background: #1f2a44; color: #fff; border: 0; font-weight: 700; }
@@ -175,30 +175,30 @@
.mu-cover-note {
position: absolute; left: 12px; bottom: 12px; z-index: 500;
padding: 4px 10px; border-radius: 999px; font-size: .78rem;
background: rgba(255, 255, 255, .9); color: #8a6100; border: 1px solid #f0d9a8;
background: var(--c-glass-24); color: var(--c-warn); border: 1px solid #f0d9a8;
}
.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 h1 { margin: 6px 0 12px; font-size: 1.35rem; color: var(--c-ink); font-weight: 800; line-height: 1.4; }
/* ย่อหน้า: เว้นระยะ 20px + ย่อหน้าหน้าบรรทัด 1.5em (แบบหนังสือไทย) */
.mu-post-body p { margin: 0 0 20px; color: #4a5568; font-size: .96rem; line-height: 1.9; text-indent: 1.5em; }
.mu-post-body p { margin: 0 0 20px; color: var(--c-ink-2); font-size: .96rem; line-height: 1.9; text-indent: 1.5em; }
.mu-post-body p:last-child { margin-bottom: 0; }
/* ย่อหน้าที่เป็นรูป/บรรทัดข้อมูลไม่ต้องย่อหน้า */
.mu-post-body p.mu-post-figure, .mu-post-figure, .mu-post-body p:empty { text-indent: 0; }
/* มาร์กดาวน์เบา ๆ ในเนื้อหา (จาก textN.json) */
.mu-post-body strong { color: #1f2a44; font-weight: 800; }
.mu-post-body strong { color: var(--c-ink); font-weight: 800; }
.mu-post-body em { font-style: italic; }
.mu-post-body a { color: #7a4cc0; font-weight: 700; text-decoration: none; border-bottom: 1px solid #d9cbf3; }
.mu-post-body a:hover { border-bottom-color: #7a4cc0; }
.mu-post-body a { color: var(--c-brand-ink); font-weight: 700; text-decoration: none; border-bottom: 1px solid #d9cbf3; }
.mu-post-body a:hover { border-bottom-color: var(--c-brand); }
.mu-post-body code { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .88em;
background: #f4f1fb; border: 1px solid #e7e0f6; border-radius: 4px; padding: 1px 5px; color: #5b4a80; }
background: var(--c-tint-purple); border: 1px solid var(--c-border); border-radius: 4px; padding: 1px 5px; color: #5b4a80; }
.mu-post-body ul { margin: 0 0 20px; padding-left: 20px; }
.mu-post-body li { color: #4a5568; font-size: .96rem; line-height: 1.9; margin-bottom: 4px; }
.mu-post-body li { color: var(--c-ink-2); font-size: .96rem; line-height: 1.9; margin-bottom: 4px; }
.mu-post-figure { margin: 4px 0 16px; }
.mu-post-figure img { width: 100%; height: auto; border-radius: 10px; border: 1px solid #e7e0f6; display: block; }
.mu-post-figure figcaption { margin-top: 6px; color: #6f7b95; font-size: .82rem; text-align: center; }
.mu-post-figure img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--c-border); display: block; }
.mu-post-figure figcaption { margin-top: 6px; color: var(--c-ink-2); font-size: .82rem; text-align: center; }
.mu-post-back {
display: inline-flex; align-items: center; gap: 6px;
margin-bottom: 16px; color: #7a4cc0; font-weight: 700;
margin-bottom: 16px; color: var(--c-brand-ink); font-weight: 700;
text-decoration: none; font-size: .9rem;
}
.mu-post-back:hover { text-decoration: underline; }
+23 -23
View File
@@ -7,11 +7,11 @@
.mu-page { padding: 20px 0 48px; }
/* --- header --- */
.mu-breadcrumb { color: #6f7b95; font-size: .88rem; margin: 0 0 12px; }
.mu-breadcrumb a { color: #7a4cc0; text-decoration: none; font-weight: 600; }
.mu-breadcrumb { color: var(--c-ink-2); font-size: .88rem; margin: 0 0 12px; }
.mu-breadcrumb a { color: var(--c-brand-ink); text-decoration: none; font-weight: 600; }
.mu-page-title {
display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
margin: 0 0 16px; font-size: 1.6rem; color: #1f2a44; font-weight: 800; line-height: 1.25;
margin: 0 0 16px; font-size: 1.6rem; color: var(--c-ink); font-weight: 800; line-height: 1.25;
}
.mu-route-chip {
display: inline-flex; align-items: center; justify-content: center;
@@ -28,20 +28,20 @@
.mu-route-chip.grp-municipal { background: linear-gradient(135deg, #5b6560, #8b948f); box-shadow: 0 6px 14px rgba(107, 114, 104, .25); }
.mu-toolbar {
display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
background: #fff; border: 1px solid #e7e2f6; border-radius: 14px;
background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 14px;
padding: 12px; margin-bottom: 22px;
box-shadow: 0 8px 20px rgba(63, 43, 94, .06);
}
.mu-toolbar select {
flex: 1; min-width: 180px; min-height: 46px;
border: 1px solid #dfe6f1; background: linear-gradient(180deg, #fff, #f8fbff);
border-radius: 10px; padding: 0 12px; font-family: inherit; font-size: .95rem; color: #1f2a44;
border: 1px solid #dfe6f1; background: linear-gradient(180deg, var(--c-surface), #f8fbff);
border-radius: 10px; padding: 0 12px; font-family: inherit; font-size: .95rem; color: var(--c-ink);
}
/* --- รถประจำสาย + ติดต่อ (การ์ดเดียว ขึ้นก่อน) --- */
.mu-vehicle-card {
background: #fff;
border: 1px solid #e7e2f6;
background: var(--c-surface);
border: 1px solid var(--c-border);
border-radius: 18px;
overflow: hidden;
box-shadow: 0 4px 14px rgba(20, 40, 90, .06);
@@ -61,11 +61,11 @@
display: flex; flex-direction: column; justify-content: center; gap: 8px;
}
.mu-vehicle-card .meta .label {
margin: 0; font-size: .78rem; font-weight: 700; color: #7a4cc0;
margin: 0; font-size: .78rem; font-weight: 700; color: var(--c-brand-ink);
text-transform: uppercase; letter-spacing: .05em;
}
.mu-vehicle-card .meta h2 { margin: 0; font-size: 1.25rem; color: #1f2a44; }
.mu-vehicle-card .meta p { margin: 0; color: #6f7b95; font-size: .95rem; line-height: 1.6; }
.mu-vehicle-card .meta h2 { margin: 0; font-size: 1.25rem; color: var(--c-ink); }
.mu-vehicle-card .meta p { margin: 0; color: var(--c-ink-2); font-size: .95rem; line-height: 1.6; }
/* ติดต่อผู้ประกอบการ — อยู่ใน footer ของการ์ด */
.mu-vehicle-contact {
@@ -80,7 +80,7 @@
display: flex; align-items: center; gap: 12px;
padding: 12px 14px;
border-radius: 12px;
background: #fff; border: 1px solid #eee;
background: var(--c-surface); border: 1px solid #eee;
text-decoration: none; color: inherit;
transition: transform .15s ease, box-shadow .15s ease;
}
@@ -94,15 +94,15 @@
.mu-contact-item .ic-wrap.tone-green { background: linear-gradient(135deg, #1f8765, #51c39c); }
.mu-contact-item .ic-wrap.tone-sky { background: linear-gradient(135deg, #1877f2, #4a9bf8); }
.mu-contact-item .ic-wrap.tone-purple { background: linear-gradient(135deg, #7a4cc0, #a583e0); }
.mu-contact-item .mu-link-go { flex: 0 0 auto; display: flex; align-items: center; color: #7a4cc0; opacity: .8; }
.mu-contact-item .mu-link-go { flex: 0 0 auto; display: flex; align-items: center; color: var(--c-brand-ink); opacity: .8; }
.mu-contact-item:hover .mu-link-go { opacity: 1; transform: translateX(2px); }
.mu-contact-item .ic-wrap svg { width: 22px; height: 22px; }
.mu-contact-item .txt { flex: 1; min-width: 0; }
.mu-contact-item .txt strong { display: block; color: #1f2a44; font-size: .98rem; margin-bottom: 2px; }
.mu-contact-item .txt span { display: block; color: #6f7b95; font-size: .86rem; }
.mu-contact-item .txt strong { display: block; color: var(--c-ink); font-size: .98rem; margin-bottom: 2px; }
.mu-contact-item .txt span { display: block; color: var(--c-ink-2); font-size: .86rem; }
.mu-qr-img {
width: 72px; height: 72px; flex: none; display: block;
object-fit: contain; background: #fff;
object-fit: contain; background: var(--c-surface);
border-radius: 10px; padding: 4px; border: 1px solid #eee;
}
/* ปุ่มครอบ QR — กดเพื่อขยาย (ไม่ให้หน้าตาเปลี่ยน) */
@@ -116,15 +116,15 @@
.mu-qr-modal::backdrop { background: rgba(20, 28, 48, .55); }
.mu-qr-modal-card {
position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px;
padding: 22px 22px 18px; border-radius: 14px; background: #fff; border: 1px solid #e7e2f6;
padding: 22px 22px 18px; border-radius: 14px; background: var(--c-surface); border: 1px solid var(--c-border);
max-width: min(92vw, 360px);
}
.mu-qr-modal-card strong { color: #1f2a44; font-size: 1.02rem; text-align: center; }
.mu-qr-big { width: min(72vw, 260px); height: auto; border-radius: 10px; background: #fff; }
.mu-qr-modal-card strong { color: var(--c-ink); font-size: 1.02rem; text-align: center; }
.mu-qr-big { width: min(72vw, 260px); height: auto; border-radius: 10px; background: var(--c-surface); }
.mu-qr-close {
position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; padding: 0;
display: flex; align-items: center; justify-content: center;
border: 0; border-radius: 10px; background: #f4f1fb; color: #5b4a80; cursor: pointer;
border: 0; border-radius: 10px; background: var(--c-tint-purple); color: #5b4a80; cursor: pointer;
}
.mu-qr-close:hover { background: #e9e2f8; }
.mu-qr-close svg { width: 18px; height: 18px; }
@@ -134,12 +134,12 @@
.mu-qr-link { display: block; line-height: 0; border-radius: 10px; }
.mu-qr-link:focus-visible { outline: 2px solid #7a4cc0; outline-offset: 3px; }
.mu-qr-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.mu-copy-link.is-done { border-color: #1f8765; color: #1f8765; }
.mu-copy-link.is-done { border-color: #1f8765; color: var(--c-ok); }
/* --- แผนที่ --- */
.mu-map-card {
background: #fff;
border: 1px solid #e7e2f6;
background: var(--c-surface);
border: 1px solid var(--c-border);
border-radius: 16px;
padding: 16px;
box-shadow: 0 4px 14px rgba(20, 40, 90, .06);
+44 -44
View File
@@ -1,11 +1,11 @@
<style>
.mu-page {
background:
linear-gradient(180deg, #ffffff 0%, #faf7ff 55%, #f4f0fd 100%);
linear-gradient(180deg, var(--c-surface) 0%, #faf7ff 55%, #f4f0fd 100%);
}
.mu-hero-panel {
background: #ffffff;
background: var(--c-surface);
border: 1px solid #1f2a44;
border-radius: 8px;
padding: 18px;
@@ -15,8 +15,8 @@
gap: 16px;
align-items: stretch;
}
.mu-hero-title { margin: 0; font-size: 1.6rem; line-height: 1.2; color: #1f2a44; }
.mu-hero-subtitle { margin: 8px 0 0; color: #66728f; font-size: .95rem; max-width: 48rem; }
.mu-hero-title { margin: 0; font-size: 1.6rem; line-height: 1.2; color: var(--c-ink); }
.mu-hero-subtitle { margin: 8px 0 0; color: var(--c-ink-2); font-size: .95rem; max-width: 48rem; }
.mu-kpi-grid { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.mu-kpi {
border: 1px solid #d9c9f2;
@@ -24,10 +24,10 @@
padding: 12px;
background: linear-gradient(135deg, #f0e7fc, #e6d8f8);
}
.mu-kpi .label { margin: 0; color:#6b5b8a; font-size:.76rem; font-weight:700; letter-spacing:.03em; text-transform: uppercase; }
.mu-kpi .value { margin:4px 0 0; color:#2b1f4d; font-size:1.03rem; font-weight:800; font-variant-numeric: tabular-nums; }
.mu-kpi .label { margin: 0; color:var(--c-ink-3); font-size:.76rem; font-weight:700; letter-spacing:.03em; text-transform: uppercase; }
.mu-kpi .value { margin:4px 0 0; color:var(--c-ink); font-size:1.03rem; font-weight:800; font-variant-numeric: tabular-nums; }
.mu-hero-map {
border: 1px solid #e7e0f6;
border: 1px solid var(--c-border);
border-radius: 8px;
padding: 14px;
display:flex;
@@ -35,7 +35,7 @@
gap: 10px;
justify-content:space-between;
}
.mu-hero-map-title { margin:0; font-size:1rem; font-weight:800; color:#2c3e50; }
.mu-hero-map-title { margin:0; font-size:1rem; font-weight:800; color:var(--c-ink); }
.mu-hero-map-box {
flex:1;
min-height: 160px;
@@ -45,7 +45,7 @@
display:flex;
align-items:center;
justify-content:center;
color:#66728f;
color:var(--c-ink-2);
font-weight:700;
text-align:center;
padding: 18px;
@@ -53,7 +53,7 @@
/* ===== Search toolbar: 2 โหมด ===== */
.mu-toolbar {
background: #ffffff;
background: var(--c-surface);
border: 1px solid #d9c9f2;
border-radius: 8px;
padding: 14px;
@@ -76,8 +76,8 @@
padding: 10px 18px;
border: none;
border-right: 1px solid #d5c3f0;
background: #fff;
color: #5b3b71;
background: var(--c-surface);
color: var(--c-ink-2);
cursor: pointer;
display: inline-flex;
align-items: center;
@@ -100,7 +100,7 @@
gap: 10px;
border: 1px solid #d5c3f0;
border-radius: 8px;
background: #fff;
background: var(--c-surface);
padding: 0 12px;
min-height: 48px;
transition: border-color .15s ease;
@@ -116,10 +116,10 @@
font-family: inherit;
font-size: 1rem;
font-weight: 600;
color: #1f2a44;
color: var(--c-ink);
padding: 12px 0;
}
.mu-search-field input::placeholder { color: #6f7b95; font-weight: 500; opacity: .8; }
.mu-search-field input::placeholder { color: var(--c-ink-2); font-weight: 500; opacity: .8; }
/* ===== ช่องรหัสป้าย 6 ช่อง: [x] + [x][x][x][x] ===== */
.mu-code-boxes {
@@ -135,8 +135,8 @@
font-size: 1.35rem;
font-weight: 700;
font-variant-numeric: tabular-nums;
color: #1f2a44;
background: #fff;
color: var(--c-ink);
background: var(--c-surface);
border: 2px solid #e0d6f5;
border-radius: 8px;
outline: none;
@@ -149,7 +149,7 @@
.mu-code-cell::placeholder { color: #7a6a9e; font-weight: 600; opacity: 1; }
.mu-code-cell:focus {
border-color: #a855f7;
background: #faf7ff;
background: var(--c-surface-2);
}
.mu-code-cell:disabled { opacity: .45; }
/* 2 หลักหน้า (ก่อน +) — เน้นให้เห็นว่าเป็นหัวของรหัส */
@@ -167,7 +167,7 @@
font-family: "IBM Plex Mono", ui-monospace, monospace;
font-size: 1.5rem;
font-weight: 700;
color: #7a4cc0;
color: var(--c-brand-ink);
line-height: 1;
padding: 0 2px;
}
@@ -176,10 +176,10 @@
font-family: "IBM Plex Mono", ui-monospace, monospace;
font-size: .9rem;
font-weight: 700;
color: #6d28d9;
color: var(--c-brand-ink);
font-variant-numeric: tabular-nums;
}
.mu-search-hint { margin: 8px 0 0; font-size: .85rem; color: #5f6b83; }
.mu-search-hint { margin: 8px 0 0; font-size: .85rem; color: var(--c-ink-2); }
/* numpad — โชว์เฉพาะจอเล็ก */
.mu-numpad { display: none; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; max-width: 320px; }
@@ -190,8 +190,8 @@
padding: 14px 0;
border: 1px solid #e0d6f5;
border-radius: 8px;
background: #fff;
color: #1f2a44;
background: var(--c-surface);
color: var(--c-ink);
cursor: pointer;
font-variant-numeric: tabular-nums;
transition: background .12s ease, border-color .12s ease;
@@ -205,7 +205,7 @@
border-radius: 8px;
margin-top: 8px;
overflow: hidden;
background: #fff;
background: var(--c-surface);
max-height: 260px;
overflow-y: auto;
}
@@ -218,15 +218,15 @@
padding: 11px 14px;
border: none;
border-bottom: 1px solid #f1edfa;
background: #fff;
background: var(--c-surface);
font-family: inherit;
font-size: .9rem;
text-align: left;
cursor: pointer;
color: #1f2a44;
color: var(--c-ink);
}
.mu-suggest-item:last-child { border-bottom: none; }
.mu-suggest-item:hover { background: #faf7ff; }
.mu-suggest-item:hover { background: var(--c-surface-2); }
.mu-suggest-code {
font-family: "IBM Plex Mono", ui-monospace, monospace;
font-size: .85rem;
@@ -244,8 +244,8 @@
.mu-show-more .mu-btn { min-width: 220px; }
.mu-stop-card.is-stub { min-height: 120px; background: #faf8ff; border: 1px dashed #ddd2f2; box-shadow: none; }
.mu-toolbar-count { margin: 10px 0 0; font-size: .84rem; color: #6f7b95; }
.mu-toolbar-count b { color: #7a4cc0; font-variant-numeric: tabular-nums; }
.mu-toolbar-count { margin: 10px 0 0; font-size: .84rem; color: var(--c-ink-2); }
.mu-toolbar-count b { color: var(--c-brand-ink); font-variant-numeric: tabular-nums; }
/* ===== การ์ดป้าย ===== */
.mu-stop-grid[hidden] { display: none; }
@@ -260,15 +260,15 @@
margin: 0;
border-radius: 8px;
overflow: hidden;
border: 1px solid #e7e0f6;
background: #fff;
border: 1px solid var(--c-border);
background: var(--c-surface);
transition: border-color .15s ease, transform .15s ease;
}
.mu-stop-grid li:hover { border-color: #a855f7; transform: translateY(-1px); }
.mu-stop-card {
height: 100%;
padding: 16px;
background: #fff;
background: var(--c-surface);
display:flex;
flex-direction:column;
gap: 12px;
@@ -283,9 +283,9 @@
font-weight:800;
letter-spacing:.01em;
}
.mu-type-pill.local { background: #f3ecff; color: #6d28d9; }
.mu-stop-title { margin:6px 0 0; font-size:1.05rem; line-height:1.3; color:#1f2a44; }
.mu-loc { color:#6f7b95; font-size:.85rem; margin-top:4px; }
.mu-type-pill.local { background: #f3ecff; color: var(--c-brand-ink); }
.mu-stop-title { margin:6px 0 0; font-size:1.05rem; line-height:1.3; color:var(--c-ink); }
.mu-loc { color:var(--c-ink-2); font-size:.85rem; margin-top:4px; }
.mu-chip-row { display:flex; flex-wrap:wrap; gap:8px; }
.mu-chip {
display:inline-flex;
@@ -293,13 +293,13 @@
gap:6px;
padding:5px 10px;
border-radius: 4px;
background: #faf7ff;
border: 1px solid #e7e0f6;
color:#5b3b71;
background: var(--c-surface-2);
border: 1px solid var(--c-border);
color:var(--c-ink-2);
font-size:.8rem;
font-weight:700;
}
.mu-chip.route { background: #f3ecff; color:#6d28d9; border-color: #e0d6f5; }
.mu-chip.route { background: #f3ecff; color:var(--c-brand-ink); border-color: #e0d6f5; }
/* ชิปสายที่เป็นลิงก์ → ไปหน้าเช็กเวลาของสายนั้น (หน้าตาเหมือนชิปเดิม + มี hover/focus) */
a.mu-chip.route { text-decoration: none; cursor: pointer; }
a.mu-chip.route:hover { background:#e9dcff; border-color:#cdb5f2; }
@@ -318,15 +318,15 @@
padding: 7px 11px;
}
.mu-stop-action { margin-top:auto; display:flex; justify-content:space-between; align-items:center; gap:12px; }
.mu-stop-note { color:#6f7b95; font-size:.8rem; margin:0; }
.mu-stop-note { color:var(--c-ink-2); font-size:.8rem; margin:0; }
.mu-stop-thumb {
display: block;
width: 100%;
height: 180px;
object-fit: cover;
background: #f7f9fd;
border-bottom: 1px solid #e7e0f6;
background: var(--c-bg);
border-bottom: 1px solid var(--c-border);
}
/* รูป placeholder — ย่อและจัดกลาง ไม่ให้ครอปโลโก้ */
.mu-stop-thumb.is-placeholder {
@@ -340,10 +340,10 @@
list-style: none;
padding: 40px 16px;
text-align: center;
color: #6f7b95;
color: var(--c-ink-2);
border: 1px dashed #e0d6f5;
border-radius: 8px;
background: #fff;
background: var(--c-surface);
}
@media (max-width: 980px) {
+8 -8
View File
@@ -10,7 +10,7 @@
.mu-hero-lead {
margin: 14px auto 0;
max-width: 640px;
color: #5b3b71;
color: var(--c-ink-2);
font-size: .95rem;
}
@@ -26,7 +26,7 @@
gap: 14px;
}
.mu-stop-card {
background: #fff;
background: var(--c-surface);
border-radius: 16px;
overflow: hidden;
box-shadow: 0 4px 14px rgba(20, 40, 90, .06);
@@ -58,7 +58,7 @@
gap: 6px;
padding: 5px 12px;
border-radius: 999px;
background: rgba(255, 255, 255, .24);
background: var(--c-glass-24);
font-size: .74rem;
font-weight: 700;
white-space: nowrap;
@@ -70,9 +70,9 @@
.mu-stop-card[open] > summary .mu-stop-chevron { transform: rotate(180deg); }
.mu-stop-body { padding: 16px; }
.mu-stop-sub { font-weight: 700; color: #1f2a44; margin: 0 0 10px; font-size: .9rem; }
.mu-stop-sub { font-weight: 700; color: var(--c-ink); margin: 0 0 10px; font-size: .9rem; }
.mu-direction-tag {
background: #7a4cc0;
background: var(--c-brand);
color: #fff;
border-radius: 999px;
padding: 3px 10px;
@@ -85,7 +85,7 @@
padding: 6px 12px;
border-radius: 10px;
background: #f1f4fb;
color: #2b2f42;
color: var(--c-ink);
font-weight: 700;
font-size: .85rem;
border: 1px solid #e6eaf3;
@@ -99,11 +99,11 @@
}
.mu-schedule-note {
color: #9a3b6e;
color: var(--c-danger);
font-size: .82rem;
margin: 12px 0 0;
padding: 8px 12px;
background: #fff5f9;
background: var(--c-tint-pink);
border-left: 3px solid #bb3a78;
border-radius: 8px;
display: flex;
+9 -9
View File
@@ -2,18 +2,18 @@
.mu-page { background: linear-gradient(180deg, #fcfbff 0%, #f5f9ff 100%); }
.mu-credit-wrap { max-width: 46rem; margin: 0 auto; padding: 40px 28px 56px; }
.mu-credit-hero { margin-bottom: 28px; }
.mu-credit-hero h1 { margin: 0 0 8px; font-size: 1.9rem; color: #1f2a44; }
.mu-credit-hero p { margin: 0; color: #66728f; }
.mu-credit-hero h1 { margin: 0 0 8px; font-size: 1.9rem; color: var(--c-ink); }
.mu-credit-hero p { margin: 0; color: var(--c-ink-2); }
.mu-credit-section {
background: #fff; border: 1px solid #e7e0f6; border-radius: 16px;
background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 16px;
padding: 20px 22px; margin-bottom: 16px;
}
.mu-credit-section h2 { margin: 0 0 6px; font-size: 1.05rem; color: #1f2a44; }
.mu-credit-section .src { margin: 0 0 12px; color: #6f7b95; font-size: .85rem; }
.mu-credit-section ul { margin: 0; padding-left: 1.2rem; color: #3a4462; font-size: .92rem; line-height: 1.7; }
.mu-credit-section code { background: #f5eeff; color: #7a4cc0; padding: 1px 6px; border-radius: 6px; font-size: .85em; }
.mu-credit-section a { color: #7a4cc0; }
.mu-license { margin: 14px 0 0; padding: 12px 14px; background: #f9f7ff; border-left: 3px solid #7a4cc0; border-radius: 8px; font-size: .85rem; color: #4a5573; line-height: 1.6; }
.mu-credit-section h2 { margin: 0 0 6px; font-size: 1.05rem; color: var(--c-ink); }
.mu-credit-section .src { margin: 0 0 12px; color: var(--c-ink-2); font-size: .85rem; }
.mu-credit-section ul { margin: 0; padding-left: 1.2rem; color: var(--c-ink); font-size: .92rem; line-height: 1.7; }
.mu-credit-section code { background: var(--c-brand-soft); color: var(--c-brand-ink); padding: 1px 6px; border-radius: 6px; font-size: .85em; }
.mu-credit-section a { color: var(--c-brand-ink); }
.mu-license { margin: 14px 0 0; padding: 12px 14px; background: var(--c-surface-2); border-left: 3px solid #7a4cc0; border-radius: 8px; font-size: .85rem; color: var(--c-ink-2); line-height: 1.6; }
</style>
<main class="mu-page">
+2 -2
View File
@@ -4,14 +4,14 @@
.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;
background: var(--c-brand); 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-url { display: inline-block; padding: 2px 6px; border: 1px solid var(--c-border); 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) {
+26 -26
View File
@@ -2,17 +2,17 @@
.mu-page { background: linear-gradient(180deg, #fcfbff 0%, #f5f9ff 100%); }
.st-wrap { max-width: 62rem; margin: 0 auto; padding: 32px 20px 64px; }
.st-hero { margin-bottom: 22px; }
.st-hero h1 { margin: 0 0 8px; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 1.9rem); color: #1f2a44; letter-spacing: -.01em; }
.st-hero p { margin: 0; color: #66728f; font-size: .92rem; line-height: 1.65; max-width: 62ch; }
.st-hero h1 { margin: 0 0 8px; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 1.9rem); color: var(--c-ink); letter-spacing: -.01em; }
.st-hero p { margin: 0; color: var(--c-ink-2); font-size: .92rem; line-height: 1.65; max-width: 62ch; }
.st-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.st-kpi { background: #fff; border: 1px solid #e7e0f6; border-radius: 14px; padding: 14px 16px; min-width: 0; }
.st-kpi b { display: block; font-size: 1.55rem; line-height: 1.2; color: #1f2a44; font-variant-numeric: tabular-nums; }
.st-kpi span { display: block; margin-top: 4px; font-size: .76rem; font-weight: 700; color: #6f7b95; letter-spacing: .01em; }
.st-kpi { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.st-kpi b { display: block; font-size: 1.55rem; line-height: 1.2; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.st-kpi span { display: block; margin-top: 4px; font-size: .76rem; font-weight: 700; color: var(--c-ink-2); letter-spacing: .01em; }
.st-card { background: #fff; border: 1px solid #e7e0f6; border-radius: 16px; padding: 18px 20px; margin-top: 16px; }
.st-card h2 { margin: 0 0 4px; font-size: 1rem; color: #1f2a44; }
.st-card .lead { margin: 0 0 14px; color: #6f7b95; font-size: .84rem; line-height: 1.6; }
.st-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 16px; padding: 18px 20px; margin-top: 16px; }
.st-card h2 { margin: 0 0 4px; font-size: 1rem; color: var(--c-ink); }
.st-card .lead { margin: 0 0 14px; color: var(--c-ink-2); font-size: .84rem; line-height: 1.6; }
.st-grid2 { display: grid; gap: 16px; margin-top: 16px; }
.st-grid2 > .st-card { margin-top: 0; }
@@ -22,35 +22,35 @@
.st-bar i, .st-bar u { display: block; border-radius: 4px 4px 0 0; min-height: 2px; }
.st-bar i { background: linear-gradient(180deg, #b694f6, #7a4cc0); }
.st-bar u { background: #e9dffb; }
.st-bar em { font-style: normal; font-size: .6rem; color: #8a93a8; text-align: center; margin-top: 4px; white-space: nowrap; }
.st-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: .76rem; color: #6f7b95; }
.st-bar em { font-style: normal; font-size: .6rem; color: var(--c-ink-3); text-align: center; margin-top: 4px; white-space: nowrap; }
.st-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: .76rem; color: var(--c-ink-2); }
.st-legend b { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.st-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.st-table th { text-align: left; padding: 0 8px 6px 0; font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #8a93a8; border-bottom: 1px solid #efe9fb; }
.st-table td { padding: 8px 8px 8px 0; border-bottom: 1px solid #f5f1fc; color: #3a4462; vertical-align: top; }
.st-table th { text-align: left; padding: 0 8px 6px 0; font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--c-ink-3); border-bottom: 1px solid #efe9fb; }
.st-table td { padding: 8px 8px 8px 0; border-bottom: 1px solid #f5f1fc; color: var(--c-ink); vertical-align: top; }
.st-table tr:last-child td { border-bottom: 0; }
.st-table .num { width: 3.5rem; text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; color: #1f2a44; }
.st-table .when { color: #8a93a8; font-size: .74rem; white-space: nowrap; }
.st-table .term { font-weight: 700; color: #1f2a44; word-break: break-word; }
.st-table a { color: #7a4cc0; text-decoration: none; font-weight: 600; }
.st-table .num { width: 3.5rem; text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; color: var(--c-ink); }
.st-table .when { color: var(--c-ink-3); font-size: .74rem; white-space: nowrap; }
.st-table .term { font-weight: 700; color: var(--c-ink); word-break: break-word; }
.st-table a { color: var(--c-brand-ink); text-decoration: none; font-weight: 600; }
.st-table a:hover { text-decoration: underline; }
.st-empty { margin: 0; padding: 14px 0 4px; color: #8a93a8; font-size: .86rem; }
.st-empty { margin: 0; padding: 14px 0 4px; color: var(--c-ink-3); font-size: .86rem; }
.st-list { margin: 0 0 14px; padding-left: 1.15rem; color: #3a4462; font-size: .88rem; line-height: 1.75; }
.st-toggle { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid #e7e0f6; border-radius: 12px; background: #fbf9ff; font-size: .88rem; color: #3a4462; cursor: pointer; }
.st-toggle input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: #7a4cc0; flex: none; }
.st-toggle strong { display: block; color: #1f2a44; font-size: .9rem; margin-bottom: 2px; }
.st-list { margin: 0 0 14px; padding-left: 1.15rem; color: var(--c-ink); font-size: .88rem; line-height: 1.75; }
.st-toggle { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--c-border); border-radius: 12px; background: #fbf9ff; font-size: .88rem; color: var(--c-ink); cursor: pointer; }
.st-toggle input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--c-brand-ink); flex: none; }
.st-toggle strong { display: block; color: var(--c-ink); font-size: .9rem; margin-bottom: 2px; }
.st-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.st-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 9px 16px; border-radius: 10px; border: 1px solid #ddcff5; background: #fff; color: #7a4cc0; font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; }
.st-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 9px 16px; border-radius: 10px; border: 1px solid #ddcff5; background: var(--c-surface); color: var(--c-brand-ink); font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; }
.st-btn:hover { background: #f7f2ff; }
.st-btn.is-solid { background: #7a4cc0; border-color: #7a4cc0; color: #fff; }
.st-btn.is-solid { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }
.st-btn.is-solid:hover { background: #6a3fb0; }
.st-btn.is-danger { border-color: #f0c9c9; color: #b3261e; }
.st-btn.is-danger { border-color: #f0c9c9; color: var(--c-danger); }
.st-btn.is-danger:hover { background: #fdf3f3; }
.st-note { margin: 12px 0 0; font-size: .78rem; color: #8a93a8; }
.st-status { margin: 10px 0 0; min-height: 18px; font-size: .82rem; color: #1f7a3d; }
.st-note { margin: 12px 0 0; font-size: .78rem; color: var(--c-ink-3); }
.st-status { margin: 10px 0 0; min-height: 18px; font-size: .82rem; color: var(--c-ok); }
@media (min-width: 520px) { .st-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 768px) { .st-grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .st-wrap { padding: 40px 28px 72px; } }
+39 -39
View File
@@ -1,27 +1,27 @@
<style>
.mu-other-stops { margin: 16px 0 6px; }
.mu-other-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mu-other-item { display: block; padding: 10px 12px; background: #fff;
.mu-other-item { display: block; padding: 10px 12px; background: var(--c-surface);
border: 1px solid #eef0f6; border-radius: 12px; min-width: 0; }
.mu-other-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mu-other-item .mu-time-grid { margin-top: 8px; }
.mu-other-item .mu-est-note { margin-top: 4px; }
.mu-other-idx { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: #f1e9ff;
color: #7a4cc0; font-size: .78rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
color: var(--c-brand-ink); font-size: .78rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.mu-other-txt { flex: 1; min-width: 0; }
.mu-other-txt strong { display: block; color: #1f2a44; font-size: .94rem; }
.mu-other-txt span { display: block; color: #6f7b95; font-size: .8rem; }
.mu-other-txt strong { display: block; color: var(--c-ink); font-size: .94rem; }
.mu-other-txt span { display: block; color: var(--c-ink-2); font-size: .8rem; }
.mu-other-item .mu-chip { flex: 0 0 auto; font-family: ui-monospace, Consolas, monospace; font-size: .72rem; }
.mu-other-item .mu-chip.warn { background: #fff5e6; color: #9a6b00; border-color: #f2d9a8; }
.mu-other-item .mu-chip.warn { background: #fff5e6; color: var(--c-warn); border-color: #f2d9a8; }
:root {
--mu-accent: #7a4cc0;
--mu-accent: var(--c-brand);
--mu-accent-soft: #f3eafe;
--mu-ink: #1f2a44;
--mu-muted: #6f7b95;
--mu-ink: var(--c-ink);
--mu-muted: var(--c-ink-2);
--mu-border: #ecd7e6;
--mu-surface: #ffffff;
--mu-surface: var(--c-surface);
--mu-rose: #ec4899;
--mu-sky: #3071b8;
--mu-sky: var(--c-info);
--mu-mint: #1f8765;
}
.mu-page {
@@ -35,7 +35,7 @@
overflow: hidden;
border: 1px solid rgba(231, 224, 246, 0.95);
border-radius: 22px;
background: linear-gradient(135deg, #f8f4ff 0%, #f2f6ff 45%, #eefaf5 100%);
background: linear-gradient(135deg, var(--c-surface-2) 0%, var(--c-tint-cyan) 45%, var(--c-tint-green) 100%);
box-shadow: 0 16px 34px rgba(122, 76, 192, 0.12);
padding: 18px;
margin-bottom: 14px;
@@ -84,12 +84,12 @@
font-size: .9rem;
}
.mu-meta-row { display:flex; flex-wrap:wrap; gap:8px; margin: 12px 0 0; }
.mu-meta-pill { max-width: 100%; overflow-wrap: anywhere; background:linear-gradient(135deg, #ffffff, #f7f9ff); border:1px solid rgba(231, 224, 246, 0.9); color:#5b3b71; padding:6px 14px; border-radius:999px; font-size:.85rem; font-weight:600; box-shadow: 0 4px 10px rgba(122, 76, 192, 0.08); }
.mu-meta-pill.purple { background:linear-gradient(135deg, #f5eeff, #fce7f3); color:#7a4cc0; border-color:#e8d9f0; }
.mu-meta-pill.sky { background:linear-gradient(135deg, #ebf5ff, #eff6ff); color:#3071b8; border-color:#d7e7fb; }
.mu-meta-pill.mint { background:linear-gradient(135deg, #eafaf4, #ecfeff); color:#1f8765; border-color:#d1efdf; }
.mu-direction-tag { background:#7a4cc0; color:#fff; border-radius:999px; padding:2px 10px; font-size:.78rem; margin-left:8px; }
.mu-schedule-note { color:#9a3b6e; font-size:.8rem; margin-top:8px; padding:8px 12px; background:#fff5f9; border-left:3px solid #bb3a78; border-radius:4px; }
.mu-meta-pill { max-width: 100%; overflow-wrap: anywhere; background:linear-gradient(135deg, var(--c-surface), #f7f9ff); border:1px solid rgba(231, 224, 246, 0.9); color:var(--c-ink-2); padding:6px 14px; border-radius:999px; font-size:.85rem; font-weight:600; box-shadow: 0 4px 10px rgba(122, 76, 192, 0.08); }
.mu-meta-pill.purple { background:linear-gradient(135deg, #f5eeff, #fce7f3); color:var(--c-brand-ink); border-color:#e8d9f0; }
.mu-meta-pill.sky { background:linear-gradient(135deg, #ebf5ff, #eff6ff); color:var(--c-info); border-color:#d7e7fb; }
.mu-meta-pill.mint { background:linear-gradient(135deg, #eafaf4, #ecfeff); color:var(--c-ok); border-color:#d1efdf; }
.mu-direction-tag { background:var(--c-brand); color:#fff; border-radius:999px; padding:2px 10px; font-size:.78rem; margin-left:8px; }
.mu-schedule-note { color:var(--c-danger); font-size:.8rem; margin-top:8px; padding:8px 12px; background:var(--c-tint-pink); border-left:3px solid #bb3a78; border-radius:4px; }
.mu-hero-metric-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
@@ -100,15 +100,15 @@
border: 1px solid rgba(231, 224, 246, 0.9);
border-radius: 12px;
padding: 10px;
background: #fff;
background: var(--c-surface);
box-shadow: 0 6px 14px rgba(122, 76, 192, 0.08);
min-width: 0;
overflow-wrap: anywhere;
}
.mu-hero-metric:nth-child(1) { background: linear-gradient(135deg, #f5efff, #fdf2f8); }
.mu-hero-metric:nth-child(1) { background: linear-gradient(135deg, var(--c-tint-purple), var(--c-tint-pink)); }
.mu-hero-metric:nth-child(2) { background: linear-gradient(135deg, #ecfeff, #eef6ff); }
.mu-hero-metric:nth-child(3) { background: linear-gradient(135deg, #fff1f2, #fff7ed); }
.mu-hero-metric:nth-child(4) { background: linear-gradient(135deg, #ecfdf5, #f0fdfa); }
.mu-hero-metric:nth-child(4) { background: linear-gradient(135deg, var(--c-tint-green), var(--c-tint-cyan)); }
.mu-hero-metric-label {
margin: 0;
color: var(--mu-muted);
@@ -126,11 +126,11 @@
}
.mu-stop-summary-main { order: 2; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.mu-stop-summary-main strong { font-size: .95rem; line-height: 1.3; }
.mu-stop-summary-main .mu-stop-summary-meta { color: #6f7b95; font-size: .78rem; }
.mu-route-type-badge { display: inline-flex; align-items: center; gap: 5px; order: 3; flex: none; background: linear-gradient(135deg, #f5eeff, #fce7f3); color: #7a4cc0; padding: 4px 8px; border-radius: 8px; font-size: .8rem; font-weight: 700; border: 1px solid #e8d9f0; white-space: nowrap; }
.mu-stop-summary-main .mu-stop-summary-meta { color: var(--c-ink-2); font-size: .78rem; }
.mu-route-type-badge { display: inline-flex; align-items: center; gap: 5px; order: 3; flex: none; background: linear-gradient(135deg, #f5eeff, #fce7f3); color: var(--c-brand-ink); padding: 4px 8px; border-radius: 8px; font-size: .8rem; font-weight: 700; border: 1px solid #e8d9f0; white-space: nowrap; }
.mu-stop-summary-rail { order: 4; flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.mu-route-chip { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 38px; padding: 5px 9px; border-radius: 8px; background: linear-gradient(135deg, #7a4cc0, #b07ce0); color: #fff; font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 700; font-size: .92rem; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.mu-stop-chevron { display: inline-block; color: #7a4cc0; font-size: .9rem; line-height: 1; transition: transform .2s ease; }
.mu-stop-chevron { display: inline-block; color: var(--c-brand-ink); font-size: .9rem; line-height: 1; transition: transform .2s ease; }
.mu-stop-expander[open] .mu-stop-chevron { transform: rotate(180deg); }
.mu-live-clock-card {
display: flex;
@@ -141,12 +141,12 @@
padding: 12px 14px;
border: 1px solid rgba(240, 191, 224, 0.9);
border-radius: 14px;
background: linear-gradient(135deg, #ffe8f4 0%, #f5f0ff 50%, #e8f7ff 100%);
background: linear-gradient(135deg, var(--c-tint-pink) 0%, var(--c-tint-purple) 50%, var(--c-tint-cyan) 100%);
box-shadow: 0 8px 20px rgba(122, 76, 192, 0.10);
}
.mu-live-clock-title {
margin: 0;
color: #6f7b95;
color: var(--c-ink-2);
font-size: .78rem;
font-weight: 700;
letter-spacing: .04em;
@@ -156,7 +156,7 @@
margin: 2px 0 0;
font-size: 1.65rem;
line-height: 1;
color: #1f2a44;
color: var(--c-ink);
font-weight: 800;
font-family: "K2D", "Prompt", "Noto Sans Thai", sans-serif;
}
@@ -164,7 +164,7 @@
margin: 0;
padding: 6px 10px;
border-radius: 999px;
background: linear-gradient(135deg, #ffffff, #fff7fb);
background: linear-gradient(135deg, var(--c-surface), var(--c-tint-pink));
border: 1px solid #eec7df;
color: #9333ea;
font-size: .78rem;
@@ -185,9 +185,9 @@
display: inline-flex;
align-items: center;
gap: 6px;
background: #fff;
background: var(--c-surface);
border: 1px solid #f0d6e6;
color: #9a3b6e;
color: var(--c-danger);
border-radius: 999px;
padding: 3px 10px;
font-size: .76rem;
@@ -209,7 +209,7 @@
.mu-panel {
border: 1px solid rgba(231, 224, 246, 0.95);
border-radius: 18px;
background: linear-gradient(180deg, #ffffff, #fffbfe);
background: linear-gradient(180deg, var(--c-surface), var(--c-surface-2));
box-shadow: 0 10px 24px rgba(122, 76, 192, 0.09);
}
@@ -225,8 +225,8 @@
border: 1px solid #e9e2fb;
box-shadow: 0 8px 24px rgba(67, 56, 202, 0.08);
}
.mu-info-card .label { font-size: .78rem; color:#66728f; margin:0; font-weight:700; }
.mu-info-card .value { margin:4px 0 0; font-size:1rem; font-weight:700; color:#2b2f42; }
.mu-info-card .label { font-size: .78rem; color:var(--c-ink-2); margin:0; font-weight:700; }
.mu-info-card .value { margin:4px 0 0; font-size:1rem; font-weight:700; color:var(--c-ink); }
.mu-layout-grid {
display: grid;
@@ -236,7 +236,7 @@
}
.mu-card-panel {
background: #fff;
background: var(--c-surface);
border: 1px solid #ebe8f4;
border-radius: 16px;
padding: 18px;
@@ -289,7 +289,7 @@
padding: 10px 12px;
font-size: .9rem;
color: var(--mu-ink);
background: linear-gradient(180deg, #ffffff, #f8fbff);
background: linear-gradient(180deg, var(--c-surface), #f8fbff);
outline: none;
box-shadow: 0 2px 4px rgba(0,0,0,.02);
}
@@ -299,7 +299,7 @@
}
.mu-route-count {
border: 1px solid rgba(233, 200, 251, 0.9);
background: linear-gradient(135deg, #faf5ff, #fdf2f8);
background: linear-gradient(135deg, #faf5ff, var(--c-tint-pink));
color: #6b21a8;
border-radius: 999px;
padding: 8px 12px;
@@ -311,14 +311,14 @@
border-radius: 14px;
margin-bottom: 8px;
overflow: hidden;
background: linear-gradient(180deg, #fff, #fffafe);
background: linear-gradient(180deg, var(--c-surface), #fffafe);
}
.mu-stop-expander[open] {
border-color: rgba(226, 201, 245, 0.95);
box-shadow: 0 8px 18px rgba(122, 76, 192, 0.10);
}
.mu-stop-expander > summary {
background: linear-gradient(180deg, #fff, #fff6fb);
background: linear-gradient(180deg, var(--c-surface), #fff6fb);
padding: 14px;
/* flex + wrap: จอกว้างเรียงบรรทัดเดียว / จอแคบพับลงมา ไม่ทับกัน */
display: flex;
@@ -341,7 +341,7 @@
.mu-toolbar {
margin-top: 10px;
margin-bottom: 12px;
background: rgba(255,255,255,.8);
background: var(--c-glass-24);
backdrop-filter: blur(8px);
border: 1px solid rgba(231, 224, 246, 0.9);
border-radius: 14px;
@@ -398,7 +398,7 @@
background: #f7f4fd; box-shadow: none; border: 1px solid #e8e4f2;
}
.mu-nearby {
background: #fff; border: 1px solid var(--mu-border); border-radius: 20px;
background: var(--c-surface); border: 1px solid var(--mu-border); border-radius: 20px;
padding: 18px; margin: 14px 0; box-shadow: 0 10px 24px rgba(63,43,94,.06);
}
.mu-nearby h2 { margin: 0 0 4px; font-size: 1.15rem; color: var(--mu-ink); }
+6 -6
View File
@@ -70,7 +70,7 @@ main.mu-container { padding-top: 24px; padding-bottom: 24px; }
display: flex; align-items: center; justify-content: center;
width: 44px; height: 44px;
border: none; background: transparent; cursor: pointer;
color: #1f2a44; list-style: none;
color: var(--c-ink); list-style: none;
border-radius: 10px;
}
.mu-menu-btn::-webkit-details-marker { display: none; }
@@ -78,7 +78,7 @@ main.mu-container { padding-top: 24px; padding-bottom: 24px; }
.mu-menu-panel {
position: absolute; top: calc(100% + 8px); right: 0;
min-width: 220px;
background: #fff; border: 1px solid #e7e2f6; border-radius: 14px;
background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 14px;
box-shadow: 0 12px 28px rgba(20, 40, 90, .16);
padding: 8px;
z-index: 60;
@@ -88,7 +88,7 @@ main.mu-container { padding-top: 24px; padding-bottom: 24px; }
display: flex; align-items: center;
min-height: 48px; padding: 10px 14px;
border-radius: 10px;
color: #1f2a44; text-decoration: none;
color: var(--c-ink); text-decoration: none;
font-size: 1.05rem; font-weight: 600;
}
.mu-menu-panel a:hover, .mu-menu-panel a:active { background: #f5efff; }
@@ -125,8 +125,8 @@ main.mu-container { padding-top: 14px; padding-bottom: 14px; }
#view .mu-zone-seg { display: inline-flex; align-items: baseline; gap: 5px; min-width: 0; }
#view .mu-zone-seg:not(:last-child)::after { content: "\00b7"; color: #c4bcd8; margin-left: 8px; } /* คั่นท้ายชิ้น → ตัดบรรทัดแล้วจุดไม่ไปอยู่ต้นบรรทัด */
#view .mu-zone-seg .ic { align-self: center; flex: none; }
#view .mu-zone-now b { color: #1f2a44; font-variant-numeric: tabular-nums; }
#view .mu-zone-at { color: #8a93a8; } /* ชื่อสถานีในวงเล็บ — จางกว่ารอบรถ */
#view .mu-zone-now b { color: var(--c-ink); font-variant-numeric: tabular-nums; }
#view .mu-zone-at { color: var(--c-ink-3); } /* ชื่อสถานีในวงเล็บ — จางกว่ารอบรถ */
#view .mu-zone-updated { color: #8a7aa8; font-size: .95rem; }
.mu-grid { gap: 12px; }
.mu-route-info { padding: 16px 16px 18px; }
@@ -275,7 +275,7 @@ main.mu-container { padding-top: 14px; padding-bottom: 14px; }
/* เวลาที่ "คำนวณจากต้นทาง" (ไม่ใช่ตารางจริงของผู้ประกอบการ) — ทำเครื่องหมายให้ผู้ใช้รู้ ไม่ให้เข้าใจผิด */
.mu-time-grid.is-est .mu-time-chip {
border: 1px dashed #a892d4;
background: #faf7ff;
background: var(--c-surface-2);
color: #6b5a8e;
font-style: italic;
}
+1 -1
View File
@@ -13,7 +13,7 @@
- ขั้นตอนอัปเดต: ดู AGENTS.md หัวข้อ PWA
============================================================ */
const VERSION = "2026.09.27.109"; // ← bump ทุกครั้งที่แก้ SW เอง
const VERSION = "2026.09.27.115"; // ← bump ทุกครั้งที่แก้ SW เอง
const CACHE = `at-transit-${VERSION}`;
const PRECACHE = [
+219
View File
@@ -0,0 +1,219 @@
/* ============================================================
Atroute (mock) — Theme tokens (light / dark)
------------------------------------------------------------
พอร์ตจาก web-at-transit/frontend/src/styles/theme.css
⚠️ ค่าโทเคนต้อง "เหมือนกันเป๊ะ" กับฝั่ง Next — GUI สองโปรเจกต์ต้องหน้าตาตรงกัน
โหมด (ดู ui/theme.js + ปุ่มใน header)
light = สว่าง · dark = มืด · auto = ตามธีมอุปกรณ์ (prefers-color-scheme)
หลักการ
- สีทั้งหมดของ mock ต้องอ้าง var(--c-*) — ห้ามใส่ hex ใหม่ในไฟล์อื่น
- ถ้าต้องเพิ่มสี: เพิ่มเป็นโทเคนที่นี่ (light + dark คู่กัน) แล้วใช้ var()
- DESIGN.md เป็นรัฐธรรมนูญ — สีแบรนด์คือ #7a4cc0 (ม่วง) ห้ามเปลี่ยน
============================================================ */
@media (prefers-reduced-motion: no-preference) {
html { transition: background-color .18s ease; }
}
:root {
color-scheme: light;
/* พื้นผิว */
--c-surface: #ffffff;
--c-surface-2: #faf7ff;
--c-surface-3: #f4f2fa;
/* ตัวอักษร */
--c-ink: #1f2a44;
--c-ink-2: #5f6b83; /* ปรับให้ผ่าน AA บนพื้นขาว (4.25 → 5.1) */
--c-ink-3: #8b94a8;
/* เส้นขอบ */
--c-border: #e7e2f6;
--c-border-2: #ebe8f4;
/* แบรนด์ */
--c-brand: #7a4cc0;
--c-brand-ink: #7a4cc0; /* ม่วงที่ใช้เป็น "ตัวอักษร" บนพื้น */
--c-brand-soft: #f4f0fb;
--c-on-brand: #ffffff;
/* โฟกัส (คีย์บอร์ด) */
--c-focus: #7a4cc0;
/* มุมโค้ง — DESIGN.md §3: มีแค่ 4px / 8px (+ pill) */
--radius-sm: 4px;
--radius: 8px;
--radius-pill: 999px;
/* เงา */
--c-shadow: rgba(26, 18, 46, .10);
/* พื้นหลังหน้า (เข้มกว่าการ์ดเล็กน้อย) */
--c-bg: #f7f9fd;
/* tint พื้นผิวตามความหมาย (ม่วง/ชมพู/เขียว/เหลือง/ฟ้า) */
--c-tint-purple: #f4f1fb;
--c-tint-pink: #fff5f9;
--c-tint-green: #e8f8ef;
--c-tint-amber: #fffdf6;
--c-tint-cyan: #ecfeff;
/* สีความหมาย (ข้อความบนพื้น) */
--c-ok: #1f7a3d;
--c-warn: #8a6100;
--c-danger: #b02a37;
--c-info: #3071b8;
/* พื้นผิวโปร่งแสง (glass) */
--c-glass: rgba(255, 255, 255, .92);
--c-glass-70: rgba(255, 255, 255, .70);
--c-glass-24: rgba(255, 255, 255, .24);
}
:root[data-theme="dark"] {
color-scheme: dark;
--c-surface: #171225;
--c-surface-2: #1f1833;
--c-surface-3: #251d3d;
--c-ink: #ece9f7;
--c-ink-2: #a9a2c4;
--c-ink-3: #8d86ab;
--c-border: #352b52;
--c-border-2: #2c2444;
--c-brand: #7a4cc0;
--c-brand-ink: #b892f5; /* สว่างขึ้นเพื่อให้ผ่าน 4.5:1 บนพื้นมืด */
--c-brand-soft: #241b3b;
--c-on-brand: #ffffff;
--c-focus: #b892f5;
--c-shadow: rgba(0, 0, 0, .45);
--c-bg: #120e1e;
--c-tint-purple: #241c3b;
--c-tint-pink: #2e1a2a;
--c-tint-green: #15291f;
--c-tint-amber: #2b2416;
--c-tint-cyan: #16262b;
--c-ok: #6ee7a8;
--c-warn: #fbbf24;
--c-danger: #ff9db0;
--c-info: #7cc0ff;
--c-glass: rgba(23, 18, 37, .92);
--c-glass-70: rgba(23, 18, 37, .80);
--c-glass-24: rgba(255, 255, 255, .10);
}
/* ---------- ฐาน ---------- */
html {
background: var(--c-surface);
}
body {
color: var(--c-ink);
background: var(--c-bg);
}
/* ฟอร์ม/คอนโทรลใช้สีระบบให้เข้ากับธีม */
input,
select,
textarea,
button {
color-scheme: inherit;
}
/* ภาพที่อาจสว่างเกินไปบนพื้นมืด (โลโก้พาร์ทเนอร์/แผนที่) — ลดความจ้าเล็กน้อย */
:root[data-theme="dark"] img.mu-marquee-tile img,
:root[data-theme="dark"] .mu-marquee-tile img {
filter: brightness(.92);
}
/* กันจอขาววูบตอนสลับธีม */
@media (prefers-reduced-motion: no-preference) {
html,
body {
transition: background-color .18s ease, color .18s ease;
}
}
/* ============================================================
dark overrides — เฉพาะจุดที่ใช้ "ไล่เฉด/ภาพประดับ" (ไม่มี token ตรงตัว)
ค่าโทเคนหลักยังมาจาก :root[data-theme="dark"] ด้านบน
============================================================ */
:root[data-theme="dark"] .mu-hero {
background: linear-gradient(180deg, #1b1430 0%, #241726 55%, #2a2318 100%);
}
:root[data-theme="dark"] .mu-page {
background: linear-gradient(180deg, var(--c-surface) 0%, var(--c-bg) 100%);
}
:root[data-theme="dark"] .mu-blob { opacity: .28; }
:root[data-theme="dark"] .mu-menu-panel a:hover,
:root[data-theme="dark"] .mu-menu-panel a:active { background: var(--c-brand-soft); }
:root[data-theme="dark"] .mu-select-box,
:root[data-theme="dark"] .mu-lang-btn { background: var(--c-surface-2); border-color: var(--c-border); }
:root[data-theme="dark"] .mu-meta-pill.sky { background: var(--c-tint-cyan); border-color: var(--c-border); }
:root[data-theme="dark"] .mu-meta-pill.mint { background: var(--c-tint-green); border-color: var(--c-border); }
:root[data-theme="dark"] .mu-meta-pill.pink { background: var(--c-tint-pink); border-color: var(--c-border); }
:root[data-theme="dark"] .mu-cover { background: linear-gradient(135deg, var(--c-surface-2) 0%, var(--c-tint-purple) 100%); }
/* ============================================================
dark patch — คลาสที่ยังใช้สี literal ใน partial/index (mock)
ทุกค่าใช้โทเคนเดียวกับ Next → GUI สองฝั่งตรงกัน
============================================================ */
:root[data-theme="dark"] .mu-nav a { color: var(--c-danger); }
:root[data-theme="dark"] .mu-nav a.active { color: var(--c-danger); border-bottom-color: var(--c-danger); }
:root[data-theme="dark"] .mu-stop-card.is-stub {
background: var(--c-surface-2); border-color: var(--c-border);
}
:root[data-theme="dark"] .mu-chip.route,
:root[data-theme="dark"] .mu-type-pill.local { background: var(--c-tint-purple); border-color: var(--c-border); }
:root[data-theme="dark"] a.mu-chip.route:hover { background: var(--c-brand-soft); border-color: var(--c-border); }
:root[data-theme="dark"] .mu-time-chip {
background: var(--c-surface-2); color: var(--c-ink); border-color: var(--c-border);
}
:root[data-theme="dark"] .mu-hero-metric:nth-child(1) { background: linear-gradient(135deg, var(--c-tint-purple), var(--c-tint-pink)); }
:root[data-theme="dark"] .mu-hero-metric:nth-child(2) { background: linear-gradient(135deg, var(--c-tint-cyan), var(--c-surface-2)); }
:root[data-theme="dark"] .mu-hero-metric:nth-child(3) { background: linear-gradient(135deg, var(--c-tint-pink), var(--c-tint-amber)); }
:root[data-theme="dark"] .mu-hero-metric-label { color: var(--c-ink-2); }
:root[data-theme="dark"] .mu-hero-metric-value { color: var(--c-ink); }
:root[data-theme="dark"] .mu-hero-lead { color: var(--c-ink-2); }
:root[data-theme="dark"] .mu-blog-excerpt { color: var(--c-ink-2); }
:root[data-theme="dark"] .mu-card .mu-badge { background: var(--c-tint-green); color: var(--c-ok); }
:root[data-theme="dark"] .mu-cover-tag { background: var(--c-glass); color: var(--c-ink); }
:root[data-theme="dark"] .mu-meta-pill { background: var(--c-surface-2); border-color: var(--c-border); color: var(--c-ink-2); }
:root[data-theme="dark"] .mu-credit-section,
:root[data-theme="dark"] .st-card,
:root[data-theme="dark"] .st-kpi { background: var(--c-surface); border-color: var(--c-border); }
:root[data-theme="dark"] .mu-license { background: var(--c-surface-2); }
:root[data-theme="dark"] .mu-credit-section a,
:root[data-theme="dark"] .st-table a { color: var(--c-brand-ink); }
:root[data-theme="dark"] .st-table th { color: var(--c-ink-3); border-bottom-color: var(--c-border); }
:root[data-theme="dark"] .st-table td { border-bottom-color: var(--c-border-2); }
:root[data-theme="dark"] .mu-toolbar,
:root[data-theme="dark"] .mu-search-field,
:root[data-theme="dark"] .mu-select-box { background: var(--c-surface); border-color: var(--c-border); }
:root[data-theme="dark"] .mu-suggest { background: var(--c-surface); border-color: var(--c-border); }
:root[data-theme="dark"] .mu-footer,
:root[data-theme="dark"] .mu-site-footer { background: var(--c-surface); }
:root[data-theme="dark"] .st-toggle { background: var(--c-surface-2); }
:root[data-theme="dark"] .st-btn { border-color: var(--c-border); }
/* stop detail / check — ชิปเวลาและ label ที่ยังอ้างตัวแปรท้องถิ่น */
:root[data-theme="dark"] .mu-time-chip,
:root[data-theme="dark"] .mu-time-chip.is-est { color: var(--c-ink); background: var(--c-surface-2); border-color: var(--c-border); }
:root[data-theme="dark"] .mu-time-grid .mu-time-chip { background: var(--c-surface-2); }
:root[data-theme="dark"] .mu-stop-hero,
:root[data-theme="dark"] .mu-card-panel,
:root[data-theme="dark"] .mu-route-tools,
:root[data-theme="dark"] .mu-nearby { background: var(--c-surface); border-color: var(--c-border); }
:root[data-theme="dark"] .mu-live-clock-time,
:root[data-theme="dark"] .mu-stop-hero-title { color: var(--c-ink); }
+146
View File
@@ -0,0 +1,146 @@
/* ============================================================
theme.js — ธีม 3 โหมด (สว่าง / มืด / ตามอุปกรณ์)
------------------------------------------------------------
พอร์ตจาก web-at-transit/frontend/src/components/ThemeSwitch.tsx
ให้พฤติกรรมเหมือนกันเป๊ะ:
light = สว่าง · dark = มืด · auto = ตามธีมอุปกรณ์ (prefers-color-scheme)
- เก็บที่ localStorage 'at_theme' · ตั้ง <html data-theme> + data-theme-mode
- auto ฟัง event ของ matchMedia → เปลี่ยนทันทีที่ระบบสลับโหมด (ไม่ reload)
- มีสคริปต์ inline ใน index.html ตั้งธีมก่อน paint (กันจอขาววูบ)
- ปุ่มใน header = dropdown (aria-haspopup/menu, ปิดด้วย Esc/คลิกนอก)
============================================================ */
(function () {
'use strict';
var KEY = 'at_theme';
var DARK_QUERY = '(prefers-color-scheme: dark)';
var MODES = ['light', 'dark', 'auto'];
var LABEL = { light: 'สว่าง', dark: 'มืด', auto: 'ตามอุปกรณ์' };
var LABEL_EN = { light: 'Light', dark: 'Dark', auto: 'Device' };
function mq() { return window.matchMedia ? window.matchMedia(DARK_QUERY) : null; }
function deviceTheme() { var m = mq(); return (m && m.matches) ? 'dark' : 'light'; }
function resolve(mode) { return mode === 'auto' ? deviceTheme() : mode; }
function readMode() {
try {
var v = localStorage.getItem(KEY);
if (MODES.indexOf(v) !== -1) return v;
} catch (e) { /* localStorage ปิด */ }
return 'auto';
}
function isEn() { return window.I18N && I18N.getLang && I18N.getLang() === 'en'; }
function label(mode) { return (isEn() ? LABEL_EN : LABEL)[mode]; }
/* ไอคอน 3 แบบ (inline — sprite ของ mock ไม่มีชุดนี้) */
var ICON = {
light: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M6.3 17.7l-1.4 1.4M19.1 4.9l-1.4 1.4"/></svg>',
dark: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>',
auto: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="4" width="20" height="14" rx="2"/><path d="M8 21h8M12 18v3"/></svg>'
};
var currentMode = readMode();
function paintUi() {
var btn = document.getElementById('theme-btn');
var icon = document.getElementById('theme-icon');
if (icon) icon.innerHTML = ICON[currentMode] || ICON.auto;
if (btn) {
btn.setAttribute('aria-label', 'ธีม: ' + label(currentMode) + ' / Theme');
btn.title = 'ธีม: ' + label(currentMode);
}
var items = document.querySelectorAll('#theme-menu [data-theme-mode]');
Array.prototype.forEach.call(items, function (b) {
var on = b.getAttribute('data-theme-mode') === currentMode;
b.setAttribute('aria-checked', on ? 'true' : 'false');
var lbl = b.querySelector('.mu-theme-label');
if (lbl) lbl.textContent = label(b.getAttribute('data-theme-mode'));
});
}
function apply(mode) {
if (MODES.indexOf(mode) === -1) mode = 'auto';
currentMode = mode;
var resolved = resolve(mode);
var html = document.documentElement;
html.dataset.theme = resolved;
html.dataset.themeMode = mode;
html.style.colorScheme = resolved;
paintUi();
}
function choose(mode) {
try { localStorage.setItem(KEY, mode); } catch (e) { /* เพิกเฉย */ }
apply(mode);
}
/* auto: ตามอุปกรณ์แบบสด ๆ */
function watchDevice() {
var m = mq();
if (!m) return;
var onChange = function () { if (currentMode === 'auto') apply('auto'); };
if (typeof m.addEventListener === 'function') m.addEventListener('change', onChange);
else if (typeof m.addListener === 'function') m.addListener(onChange);
}
function wireMenu() {
var wrap = document.getElementById('theme-switch');
var btn = document.getElementById('theme-btn');
var menu = document.getElementById('theme-menu');
if (!wrap || !btn || !menu) return;
function setOpen(on) {
menu.hidden = !on;
btn.setAttribute('aria-expanded', on ? 'true' : 'false');
}
btn.addEventListener('click', function (e) {
e.stopPropagation();
setOpen(menu.hidden);
});
menu.addEventListener('click', function (e) {
var item = e.target.closest('[data-theme-mode]');
if (!item) return;
choose(item.getAttribute('data-theme-mode'));
setOpen(false);
btn.focus();
});
document.addEventListener('click', function (e) {
if (!wrap.contains(e.target)) setOpen(false);
});
document.addEventListener('keydown', function (e) {
if (e.key === 'Escape' && !menu.hidden) {
setOpen(false);
btn.focus();
}
});
}
window.AtTheme = {
mode: function () { return currentMode; },
resolved: function () { return resolve(currentMode); },
set: choose,
apply: apply,
label: label,
refresh: paintUi
};
/* ตั้งธีมทันที (สคริปต์ใน head ตั้ง data-theme ไปแล้ว — ที่นี่แค่ซิงก์ state) */
apply(currentMode);
watchDevice();
wireMenu();
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', paintUi);
} else {
paintUi();
}
/* เปลี่ยนภาษา → ป้ายในเมนูธีมต้องเปลี่ยนตาม */
window.addEventListener('langchange', paintUi);
})();
+1 -1
View File
@@ -1 +1 @@
{"version": "2026.09.27.109"}
{"version": "2026.09.27.115"}