Rebuild mock as hash-routed SPA with i18n and PWA refresh
- Single-page shell (ui/index.html) + vanilla hash router; each screen is a partial - New #/check schedule view (all stop times open, no collapse) wired to the 'check schedules' CTA; contact-operator box, route map and gallery trimmed from it - Mobile-first responsive.css (375px iPhone 8 up to 27-inch/1440p) - TH/EN i18n system (data-i18n, browser-language detect, topbar switcher) - Shared form controls moved to _shared.css (mu-btn, custom select chevron, focus-visible ring); footer contact column now mailto:[email protected] - SW v9: JS network-first, precache i18n.js + all partials - Legacy pages become redirect stubs to index.html#/...
This commit is contained in:
1 parent
8a6133fd77
commit
c44f79b7d9
41 files changed
+4214
-2359
No files matched your search
+125
@@ -366,3 +366,128 @@ body:has(.mu-site-footer) .mu-footer { display: none; }
|
||||
.mu-footer-grid { grid-template-columns: 1fr; }
|
||||
.mu-site-footer { padding: 36px 0 0; }
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
Icon system — Lucide (MIT) — ใช้ <svg class="ic"><use href="#ic-NAME"/></svg>
|
||||
sprite: partials/icons-sprite.svg | credit: ui/credits.html
|
||||
========================================================= */
|
||||
.ic {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
display: inline-block;
|
||||
vertical-align: -0.125em;
|
||||
fill: none;
|
||||
stroke: currentColor;
|
||||
stroke-width: 2;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.ic--lg { width: 1.4em; height: 1.4em; }
|
||||
|
||||
/* ---------- Search field (input + icon ข้างหน้า) ---------- */
|
||||
.mu-search-field {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
min-width: 220px;
|
||||
}
|
||||
.mu-search-field .ic {
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
color: #6f7b95;
|
||||
pointer-events: none;
|
||||
}
|
||||
.mu-search-field input {
|
||||
width: 100%;
|
||||
padding: 10px 12px 10px 38px;
|
||||
}
|
||||
|
||||
/* ---------- ปุ่มสลับภาษา (ไทย / EN) ---------- */
|
||||
.mu-lang-switch {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
background: #f0edf7;
|
||||
border: 1px solid #e4dcf2;
|
||||
border-radius: 999px;
|
||||
padding: 3px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.mu-lang-btn {
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: #6d28d9;
|
||||
font-family: inherit;
|
||||
font-weight: 700;
|
||||
font-size: .72rem;
|
||||
line-height: 1;
|
||||
padding: 6px 10px;
|
||||
border-radius: 999px;
|
||||
cursor: pointer;
|
||||
transition: background .15s ease, color .15s ease;
|
||||
}
|
||||
.mu-lang-btn:hover { color: #5b21b6; }
|
||||
.mu-lang-btn.active {
|
||||
background: #fff;
|
||||
color: #7a4cc0;
|
||||
box-shadow: 0 1px 4px rgba(63, 43, 94, .18);
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
ปุ่ม + ฟอร์มคอนโทรล (shared — ทุกหน้าใช้ร่วมกัน)
|
||||
.mu-btn อยู่ที่นี่ (ไม่ใช่ใน partial) → หน้าไหนก็ได้สไตล์เดียวกัน
|
||||
============================================================ */
|
||||
.mu-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
min-height: 44px;
|
||||
padding: 10px 18px;
|
||||
border-radius: 12px;
|
||||
font-family: inherit;
|
||||
font-weight: 700;
|
||||
font-size: .85rem;
|
||||
line-height: 1;
|
||||
text-decoration: none;
|
||||
border: 1px solid transparent;
|
||||
cursor: pointer;
|
||||
transition: box-shadow .15s ease, transform .1s ease, background .15s ease, border-color .15s ease;
|
||||
}
|
||||
.mu-btn:active { transform: translateY(1px); }
|
||||
.mu-btn.primary {
|
||||
background: linear-gradient(135deg, #a855f7, #7c3aed);
|
||||
color: #fff;
|
||||
box-shadow: 0 8px 18px rgba(124, 58, 237, .25);
|
||||
}
|
||||
.mu-btn.primary:hover { box-shadow: 0 10px 22px rgba(124, 58, 237, .35); }
|
||||
.mu-btn.ghost {
|
||||
background: #fff;
|
||||
border-color: #e7e2f6;
|
||||
color: #5b3b71;
|
||||
box-shadow: 0 2px 8px rgba(63, 43, 94, .05);
|
||||
}
|
||||
.mu-btn.ghost:hover { border-color: #d8c9f2; background: #faf7ff; }
|
||||
|
||||
/* 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-repeat: no-repeat;
|
||||
background-position: right 12px center;
|
||||
padding-right: 38px;
|
||||
cursor: pointer;
|
||||
}
|
||||
#view .mu-toolbar select:hover { border-color: #c8b4ec; }
|
||||
#view .mu-toolbar input:hover { border-color: #c8b4ec; }
|
||||
|
||||
/* focus ring อันเดียวกันทั้งฟอร์ม — มองเห็นชัดตอน tab (a11y) */
|
||||
#view .mu-toolbar input:focus-visible,
|
||||
#view .mu-toolbar select:focus-visible,
|
||||
#view .mu-toolbar .mu-btn:focus-visible {
|
||||
outline: 2px solid #7a4cc0;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
Reference in new issue
Block a user