sync from mock: motion, privacy-first search stats, auto-update UX
- frontend/src/lib/ui/motion.ts + components/MotionBoot.tsx: page-enter and scroll reveal per pathname change (ported from mock motion.js); IntersectionObserver plus sweep fallback for jump-scroll/hidden tabs, maps never transformed - frontend/src/lib/ui/analytics.ts: cookie-less local-first search analytics (localStorage at_stats_v1, DNT/GPC + opt-out, term sanitiser, 900ms debounce, caps 300 terms / 200 views / 120 days); optional Umami endpoint via AT_ANALYTICS - /stats page (StatsView + styles/pages/stats.css): KPIs, 14-day chart, top terms, top route/stop pages, no-result terms, JSON export, clear, opt-out - hooks: stops search apply(), stop detail route filter - remove footer visitor counter (lib/ui/visitors.ts, .mu-visitor/.mu-vreset, i18n keys) - remove floating install-app button; PwaBoot keeps SW + guarded version toast (sessionStorage guard, silent reload when tab hidden) - i18n th/en: nav.stats, update.applying, stats.* (public + src/data locales) - version.json + sw VERSION -> 2026.10.24.3; docs/UI-PORT.md section for this round
This commit is contained in:
1 parent
c0b70ff845
commit
4b5a4d33d3
22 files changed
+1473
-453
No files matched your search
@@ -221,52 +221,8 @@
|
||||
.mu-stat.tag-purple { background: var(--c-tint-purple); }
|
||||
.mu-stat.tag-mint { background: var(--c-tint-green); }
|
||||
|
||||
/* ===== Visitor counter (footer bottom bar) ===== */
|
||||
/* ===== Footer bottom bar ===== */
|
||||
.mu-footer-bottom { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
|
||||
.mu-visitor {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
margin: 0;
|
||||
padding: 5px 12px;
|
||||
border-radius: var(--radius-pill);
|
||||
background: rgba(255,255,255,.06);
|
||||
border: 1px solid rgba(255,255,255,.1);
|
||||
color: #b6bdda;
|
||||
font-size: .78rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: .01em;
|
||||
line-height: 1;
|
||||
}
|
||||
.mu-visitor svg { width: 14px; height: 14px; color: var(--c-brand-ink); flex: none; }
|
||||
.mu-visitor strong { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
|
||||
/* ปุ่ม/ช่องรีเซ็ตผู้เข้าชม (ซ่อน — กดตัวเลข 5 ครั้ง) */
|
||||
#visitor-count { cursor: pointer; }
|
||||
.mu-vreset {
|
||||
position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center;
|
||||
padding: 20px; background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px);
|
||||
}
|
||||
.mu-vreset-card {
|
||||
width: 100%; max-width: 340px; background: var(--c-surface); border-radius: var(--radius); padding: 20px;
|
||||
box-shadow: 0 18px 50px rgba(15, 23, 42, .28);
|
||||
}
|
||||
.mu-vreset-card h4 { margin: 0 0 12px; font-size: 1rem; color: var(--c-ink); }
|
||||
.mu-vreset-card label { display: block; font-size: 0.78rem; color: var(--c-ink-2); margin-bottom: 6px; }
|
||||
.mu-vreset-card input {
|
||||
width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: .95rem;
|
||||
border: 1px solid var(--c-border); border-radius: var(--radius); color: var(--c-ink); background: var(--c-surface-2);
|
||||
}
|
||||
.mu-vreset-card input:focus { outline: 2px solid var(--c-brand-ink); outline-offset: 2px; border-color: #7a4cc0; }
|
||||
.mu-vreset-msg { margin: 10px 0 0; min-height: 18px; font-size: 0.78rem; color: var(--c-danger); }
|
||||
.mu-vreset-msg.is-ok { color: var(--c-ok); }
|
||||
.mu-vreset-row { display: flex; gap: 8px; margin-top: 16px; justify-content: flex-end; }
|
||||
.mu-vreset-row button {
|
||||
padding: 9px 16px; font-size: .85rem; font-weight: 700; border-radius: var(--radius); cursor: pointer;
|
||||
border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-info);
|
||||
}
|
||||
.mu-vreset-row button:hover { background: var(--c-surface-2); }
|
||||
.mu-vreset-ok { border-color: #7a4cc0 !important; background: var(--c-brand) !important; color: #fff !important; }
|
||||
.mu-vreset-ok:hover { background: #6a3fb0 !important; }
|
||||
|
||||
/* ===== Sponsor marquee (between hero and main) ===== */
|
||||
.mu-sponsor-marquee { padding: 26px 0 6px; background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
|
||||
|
||||
Reference in new issue
Block a user