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
+26
-26
@@ -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
|
||||
|
||||
Reference in new issue
Block a user