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:
1 parent
bea8f0773e
commit
cdfd77ffff
18 files changed
+742
-329
No files matched your search
+28
-23
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user