mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-06-03 18:21:18 +00:00
364c5766fc
## Adds new logo and home hero Replaces the navbar mushroom emoji + "CoreScope" text spans with the new CoreScope SVG mark, and adds a hero SVG (with the MESH ANALYZER tagline) above the home page H1. ### What changed - `public/img/corescope-logo.svg` — navbar mark, no tagline (locked "aggressive low-amp chirp" variant: facing-arcs + low-amp chirp connector between the two nodes). - `public/img/corescope-hero.svg` — home hero version, includes the MESH ANALYZER tagline. - `public/index.html` — replaces `<span class="brand-icon">🍄</span><span class="brand-text">CoreScope</span>` with `<img class="brand-logo" src="img/corescope-logo.svg?__BUST__" …>`. `.nav-brand` link still routes to `#/`. `.live-dot` retained. - `public/style.css` — adds `.brand-logo { height: 36px }` (32px on tablet ≤900px). Existing 52px nav height unchanged. - `public/home.js` / `public/home.css` — adds `<img class="home-hero-logo">` above the hero `<h1>`, sized `max-width: min(720px, 90vw)` and centered. ### TDD Red→green is visible in the branch: - `3159b82` — `test(logo): add failing E2E …` (red commit). Adds `test-logo-rebrand-e2e.js` and wires it into the `e2e-test` job in `deploy.yml` with `CHROMIUM_REQUIRE=1`. On this commit `index.html` still has the emoji + text spans, `home.js` has no hero img, and the SVG asset files do not exist — the test asserts on each so CI fails on assertion. - `19434e1` — `feat(logo): wire new CoreScope SVG logo …` (green commit). Implements the fix. ### E2E asserts 1. `.nav-brand img` exists with `src` ending `corescope-logo.svg` 2. legacy `.brand-icon` / `.brand-text` are gone 3. `.live-dot` is present, visible, and to the right of the logo (no overlap) 4. `.home-hero img.home-hero-logo` exists with `src` ending `corescope-hero.svg`, positioned BEFORE the `<h1>` 5. both `/img/corescope-{logo,hero}.svg` return 200 with svg content-type ### Customizer compatibility - `customize.js` still does `querySelector('.brand-text')` / `.brand-icon` for live branding updates. Both now return `null`; existing `if (el)` guards make those branches silent no-ops. **No JS errors, but the customizer's `branding.siteName` and `branding.logoUrl` fields no longer rewrite the navbar brand** — the brand is now a fixed SVG asset. - **Theme accent does NOT recolor the SVG.** SVGs loaded via `<img src>` are isolated documents and cannot inherit document CSS variables; the SVG falls back to its embedded brand colors. This is appropriate for a brand mark; if recoloring per theme is desired later, swap to inline SVG (separate PR). ### Browser validation Local Chromium not available in this env; the E2E test soft-skips locally and hard-fails in CI (`CHROMIUM_REQUIRE=1`). Server-side checks done locally: - `curl http://localhost:13581/` → confirmed `<img class="brand-logo" src="img/corescope-logo.svg?<bust>" …>` rendered, no `.brand-icon`/`.brand-text` spans. - `curl -I /img/corescope-logo.svg` and `/img/corescope-hero.svg` → both 200. ### Performance No hot-path changes. Two new static SVG assets (~7.6KB each), served directly by the Go static handler. Cache-busted via `?__BUST__` (auto-replaced server-side). --------- Co-authored-by: OpenClaw Bot <bot@openclaw.local> Co-authored-by: Kpa-clawbot <bot@kpa-clawbot.local>
502 lines
14 KiB
CSS
502 lines
14 KiB
CSS
/* === CoreScope — home.css === */
|
|
|
|
/* Home page now uses body scroll (no #app override needed — see style.css) */
|
|
|
|
/* Chooser */
|
|
.home-chooser {
|
|
max-width: 520px;
|
|
margin: 15vh auto 0;
|
|
padding: 0 20px;
|
|
text-align: center;
|
|
}
|
|
.home-chooser h1 { font-size: 1.5rem; margin-bottom: 8px; }
|
|
.home-chooser p { color: var(--text-muted); margin-bottom: 32px; }
|
|
.chooser-options { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
|
|
.chooser-btn {
|
|
display: flex; flex-direction: column; align-items: center; gap: 6px;
|
|
padding: 24px 28px; border-radius: 12px; border: 2px solid var(--border);
|
|
background: var(--surface-1); color: var(--text); cursor: pointer;
|
|
transition: border-color .15s, transform .15s; min-width: 200px;
|
|
}
|
|
.chooser-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
|
|
.chooser-icon { font-size: 2rem; }
|
|
.chooser-btn strong { font-size: 1rem; }
|
|
.chooser-btn span:last-child { font-size: .8rem; color: var(--text-muted); }
|
|
.home-level-toggle { margin-top: 16px; }
|
|
|
|
/* Hero */
|
|
.home-hero {
|
|
text-align: center;
|
|
padding: 28px 16px 20px;
|
|
background: var(--surface-1);
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.home-hero-logo {
|
|
display: block;
|
|
width: 100%;
|
|
max-width: min(720px, 90vw);
|
|
height: auto;
|
|
margin: 0 auto 16px;
|
|
/* Inline SVG (PR #1137): inherits page CSS vars (--logo-text /
|
|
--logo-accent / --logo-accent-hi / --logo-muted) so it themes with
|
|
the rest of the UI on light AND dark themes. No baked background
|
|
rect — the SVG is transparent and sits on .home-hero's surface. */
|
|
}
|
|
.home-hero h1 {
|
|
font: 700 1.5rem/1.2 var(--font);
|
|
color: var(--text);
|
|
margin: 0 0 4px;
|
|
}
|
|
.home-hero p {
|
|
color: var(--text-muted);
|
|
margin: 0 0 16px;
|
|
font-size: .85rem;
|
|
}
|
|
.home-search-wrap {
|
|
position: relative;
|
|
max-width: 480px;
|
|
margin: 0 auto;
|
|
}
|
|
.home-search-wrap input {
|
|
width: 100%;
|
|
padding: 12px 16px;
|
|
border-radius: 8px;
|
|
border: 1px solid var(--border);
|
|
background: var(--input-bg);
|
|
color: var(--text);
|
|
font: 1rem var(--font);
|
|
box-sizing: border-box;
|
|
}
|
|
.home-search-wrap input::placeholder { color: var(--text-muted); }
|
|
.home-suggest {
|
|
position: absolute;
|
|
top: 100%;
|
|
left: 0; right: 0;
|
|
background: var(--surface-2);
|
|
border: 1px solid var(--border);
|
|
border-radius: 0 0 8px 8px;
|
|
max-height: 240px;
|
|
overflow-y: auto;
|
|
z-index: 10;
|
|
display: none;
|
|
}
|
|
.home-suggest.open { display: block; }
|
|
.home-suggest-item {
|
|
padding: 10px 16px;
|
|
cursor: pointer;
|
|
color: var(--text);
|
|
font-size: .9rem;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.home-suggest-item:last-child { border-bottom: none; }
|
|
.home-suggest-item:hover { background: var(--row-hover); }
|
|
.home-suggest-item small { color: var(--text-muted); margin-left: 8px; }
|
|
|
|
/* Quick Stats */
|
|
.home-stats {
|
|
display: flex;
|
|
gap: 16px;
|
|
padding: 20px;
|
|
max-width: 720px;
|
|
margin: 0 auto;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
}
|
|
.home-stat {
|
|
background: var(--surface-1);
|
|
border: 1px solid var(--border);
|
|
border-radius: 10px;
|
|
padding: 16px 24px;
|
|
text-align: center;
|
|
flex: 1 1 120px;
|
|
min-width: 100px;
|
|
}
|
|
.home-stat .val {
|
|
font: 700 1.6rem var(--font);
|
|
color: var(--accent);
|
|
}
|
|
.home-stat .lbl {
|
|
font-size: .8rem;
|
|
color: var(--text-muted);
|
|
margin-top: 4px;
|
|
}
|
|
|
|
/* Health Card */
|
|
.home-health {
|
|
max-width: 720px;
|
|
margin: 24px auto;
|
|
padding: 0 20px;
|
|
display: none;
|
|
}
|
|
.home-health.visible { display: block; }
|
|
|
|
.health-banner {
|
|
padding: 14px 20px;
|
|
border-radius: 10px 10px 0 0;
|
|
font: 600 1rem var(--font);
|
|
color: #fff;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
.health-banner.green { background: var(--status-green); }
|
|
.health-banner.yellow { background: var(--status-yellow); color: #1a1a2e; }
|
|
.health-banner.red { background: var(--status-red); }
|
|
|
|
.health-body {
|
|
background: var(--surface-1);
|
|
border: 1px solid var(--border);
|
|
border-top: none;
|
|
border-radius: 0 0 10px 10px;
|
|
padding: 20px;
|
|
}
|
|
|
|
.health-metrics {
|
|
display: flex;
|
|
gap: 12px;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 16px;
|
|
}
|
|
.health-metric {
|
|
background: var(--surface-2);
|
|
border-radius: 8px;
|
|
padding: 12px 16px;
|
|
flex: 1 1 140px;
|
|
min-width: 120px;
|
|
}
|
|
.health-metric .val { font: 700 1.2rem var(--font); color: var(--text); }
|
|
.health-metric .lbl { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
|
|
|
|
.health-map {
|
|
height: 180px;
|
|
border-radius: 8px;
|
|
margin-bottom: 16px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.health-timeline h3 {
|
|
font: 600 .9rem var(--font);
|
|
color: var(--text-muted);
|
|
margin: 0 0 10px;
|
|
text-transform: uppercase;
|
|
letter-spacing: .5px;
|
|
}
|
|
|
|
.timeline-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 8px 10px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-size: .85rem;
|
|
color: var(--text);
|
|
transition: background .15s;
|
|
}
|
|
.timeline-item:hover { background: var(--row-hover); }
|
|
.timeline-item .time { color: var(--text-muted); font-size: .75rem; white-space: nowrap; }
|
|
.timeline-item .badge {
|
|
display: inline-block;
|
|
padding: 2px 8px;
|
|
border-radius: var(--badge-radius);
|
|
font-size: .7rem;
|
|
font-weight: 600;
|
|
color: #fff;
|
|
background: var(--accent);
|
|
}
|
|
|
|
/* Packet Journey */
|
|
.home-journey {
|
|
max-width: 720px;
|
|
margin: 0 auto 24px;
|
|
padding: 0 20px;
|
|
display: none;
|
|
}
|
|
.home-journey.visible { display: block; }
|
|
.journey-title {
|
|
font: 600 .85rem var(--font);
|
|
color: var(--text-muted);
|
|
margin-bottom: 12px;
|
|
text-transform: uppercase;
|
|
letter-spacing: .5px;
|
|
}
|
|
.journey-flow {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0;
|
|
overflow-x: auto;
|
|
padding: 12px 0;
|
|
}
|
|
.journey-node {
|
|
background: var(--surface-2);
|
|
border: 1px solid var(--border);
|
|
border-radius: 10px;
|
|
padding: 10px 16px;
|
|
text-align: center;
|
|
font-size: .8rem;
|
|
color: var(--text);
|
|
white-space: nowrap;
|
|
flex-shrink: 0;
|
|
}
|
|
.journey-node .node-name { font-weight: 600; }
|
|
.journey-node .node-meta { color: var(--text-muted); font-size: .7rem; }
|
|
.journey-arrow {
|
|
flex-shrink: 0;
|
|
width: 36px;
|
|
height: 2px;
|
|
background: var(--accent);
|
|
position: relative;
|
|
}
|
|
.journey-arrow::after {
|
|
content: '';
|
|
position: absolute;
|
|
right: 0; top: -4px;
|
|
border: 5px solid transparent;
|
|
border-left-color: var(--accent);
|
|
}
|
|
|
|
/* Checklist */
|
|
.home-checklist {
|
|
max-width: 720px;
|
|
margin: 0 auto 32px;
|
|
padding: 0 20px;
|
|
}
|
|
.home-checklist h2 {
|
|
font: 700 1.3rem var(--font);
|
|
color: var(--text);
|
|
margin: 0 0 16px;
|
|
}
|
|
.checklist-item {
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
margin-bottom: 8px;
|
|
background: var(--surface-1);
|
|
overflow: hidden;
|
|
}
|
|
.checklist-q {
|
|
padding: 14px 16px;
|
|
cursor: pointer;
|
|
font: 600 .9rem var(--font);
|
|
color: var(--text);
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
user-select: none;
|
|
}
|
|
.checklist-q::after {
|
|
content: '▸';
|
|
transition: transform .2s;
|
|
color: var(--text-muted);
|
|
}
|
|
.checklist-item.open .checklist-q::after { transform: rotate(90deg); }
|
|
.checklist-a {
|
|
max-height: 0;
|
|
overflow: hidden;
|
|
transition: max-height .3s ease;
|
|
padding: 0 16px;
|
|
font-size: .85rem;
|
|
color: var(--text-muted);
|
|
line-height: 1.6;
|
|
}
|
|
.checklist-a p { margin: 6px 0; }
|
|
.checklist-a ul { margin: 6px 0; padding-left: 20px; }
|
|
.checklist-a li { margin: 4px 0; }
|
|
.checklist-a code { background: var(--surface-1); padding: 1px 5px; border-radius: 3px; font-size: .8rem; }
|
|
.checklist-a small { display: inline-block; margin-top: 6px; }
|
|
.checklist-item.open .checklist-a {
|
|
max-height: 600px;
|
|
padding: 0 16px 14px;
|
|
}
|
|
|
|
/* Footer links */
|
|
.home-footer {
|
|
max-width: 720px;
|
|
margin: 0 auto 48px;
|
|
padding: 0 20px;
|
|
text-align: center;
|
|
}
|
|
.home-footer h2 {
|
|
font: 700 1.2rem var(--font);
|
|
color: var(--text);
|
|
margin: 0 0 16px;
|
|
}
|
|
.home-footer-links {
|
|
display: flex;
|
|
gap: 12px;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
}
|
|
.home-footer-link {
|
|
background: var(--surface-1);
|
|
border: 1px solid var(--border);
|
|
border-radius: 10px;
|
|
padding: 14px 20px;
|
|
text-decoration: none;
|
|
color: var(--accent);
|
|
font: 600 .9rem var(--font);
|
|
transition: background .15s, border-color .15s;
|
|
}
|
|
.home-footer-link:hover {
|
|
background: var(--row-hover);
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 640px) {
|
|
.home-hero { padding: 32px 16px 24px; }
|
|
.home-hero h1 { font-size: 1.5rem; }
|
|
.home-stats { gap: 8px; padding: 16px; }
|
|
.home-stat { padding: 12px 16px; }
|
|
.home-stat .val { font-size: 1.2rem; }
|
|
.health-metrics { flex-direction: column; }
|
|
.journey-flow { gap: 0; }
|
|
.home-footer-links { flex-direction: column; align-items: center; }
|
|
}
|
|
|
|
/* Favorites */
|
|
.home-favorites { max-width: 720px; margin: 0 auto 24px; padding: 0 20px; }
|
|
.fav-title { font-size: 1rem; margin-bottom: 12px; color: var(--text); }
|
|
.fav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
|
|
.fav-loading { color: var(--text-muted); font-size: .85rem; }
|
|
.fav-card {
|
|
background: var(--surface-1); border: 1px solid var(--border); border-radius: 8px;
|
|
padding: 12px; cursor: pointer; transition: border-color .15s, transform .15s;
|
|
}
|
|
.fav-card:hover { border-color: var(--accent); transform: translateY(-1px); }
|
|
.fav-card-header { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
|
|
.fav-card-header strong { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
|
|
.fav-status { font-size: .8rem; }
|
|
.fav-card-stats { display: flex; gap: 12px; flex-wrap: wrap; font-size: .75rem; color: var(--text-muted); }
|
|
.suggest-fav { font-size: .9rem; flex-shrink: 0; }
|
|
|
|
/* ==================== My Mesh Dashboard ==================== */
|
|
|
|
/* Onboarding prompt */
|
|
.onboarding-prompt {
|
|
text-align: center;
|
|
padding: 48px 20px;
|
|
max-width: 480px;
|
|
margin: 0 auto;
|
|
}
|
|
.onboard-icon { font-size: 3rem; margin-bottom: 12px; }
|
|
.onboarding-prompt h2 { font: 700 1.3rem var(--font); color: var(--text); margin: 0 0 8px; }
|
|
.onboarding-prompt p { color: var(--text-muted); font-size: .9rem; line-height: 1.5; }
|
|
|
|
/* Search suggest restyle */
|
|
.suggest-item {
|
|
padding: 10px 14px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
border-bottom: 1px solid var(--border);
|
|
transition: background .1s;
|
|
}
|
|
.suggest-item:last-child { border-bottom: none; }
|
|
.suggest-item:hover { background: var(--row-hover); }
|
|
.suggest-main { display: flex; flex-direction: column; min-width: 0; }
|
|
.suggest-name { font-weight: 600; font-size: .9rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.suggest-key { font-size: .7rem; color: var(--text-muted); font-family: var(--mono); }
|
|
.suggest-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
|
|
.suggest-role { font-size: .65rem; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; background: var(--surface-2); color: var(--text-muted); }
|
|
.suggest-empty { padding: 14px; color: var(--text-muted); font-size: .85rem; text-align: center; }
|
|
|
|
.suggest-claim {
|
|
padding: 4px 10px;
|
|
border-radius: 6px;
|
|
border: 1px solid var(--accent);
|
|
background: transparent;
|
|
color: var(--accent);
|
|
font: 600 .75rem var(--font);
|
|
cursor: pointer;
|
|
transition: all .15s;
|
|
white-space: nowrap;
|
|
}
|
|
.suggest-claim:hover { background: var(--accent); color: #fff; }
|
|
.suggest-claim.claimed {
|
|
background: var(--status-green);
|
|
border-color: var(--status-green);
|
|
color: #fff;
|
|
}
|
|
|
|
/* My Nodes Grid */
|
|
.my-nodes-grid {
|
|
max-width: 900px;
|
|
margin: 0 auto;
|
|
padding: 0 20px 20px;
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
|
|
gap: 16px;
|
|
}
|
|
.my-nodes-loading { color: var(--text-muted); font-size: .85rem; padding: 20px; grid-column: 1/-1; }
|
|
|
|
.my-node-card {
|
|
background: var(--surface-1);
|
|
border: 1px solid var(--border);
|
|
border-radius: 12px;
|
|
padding: 16px;
|
|
cursor: pointer;
|
|
transition: border-color .15s, transform .15s, box-shadow .15s;
|
|
position: relative;
|
|
}
|
|
.my-node-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
|
|
.my-node-card.healthy { border-left: 4px solid var(--status-green); }
|
|
.my-node-card.degraded { border-left: 4px solid var(--status-yellow); }
|
|
.my-node-card.silent { border-left: 4px solid var(--status-red); }
|
|
|
|
.mnc-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
|
|
.mnc-status { font-size: 1rem; flex-shrink: 0; }
|
|
.mnc-name { font: 700 1rem var(--font); color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.mnc-role { font-size: .65rem; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; background: var(--surface-2); color: var(--text-muted); }
|
|
.mnc-remove {
|
|
background: none; border: none; color: var(--text-muted); cursor: pointer;
|
|
font-size: .9rem; padding: 2px 6px; border-radius: 4px; transition: all .15s;
|
|
opacity: 0;
|
|
}
|
|
.my-node-card:hover .mnc-remove { opacity: 1; }
|
|
.mnc-remove:hover { background: var(--status-red); color: #fff; }
|
|
|
|
.mnc-status-text { font-size: .8rem; color: var(--text-muted); margin-bottom: 12px; padding-left: 28px; }
|
|
|
|
.mnc-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
|
|
.mnc-metric { text-align: center; }
|
|
.mnc-val { font: 700 1rem var(--font); color: var(--text); }
|
|
.mnc-lbl { font-size: .65rem; color: var(--text-muted); margin-top: 2px; }
|
|
|
|
.mnc-observers { font-size: .75rem; color: var(--text-muted); margin-bottom: 8px; line-height: 1.4; }
|
|
|
|
.mnc-spark { margin-bottom: 8px; }
|
|
.spark-label { font-size: .65rem; color: var(--text-muted); margin-bottom: 4px; }
|
|
.spark-bars { display: flex; align-items: flex-end; gap: 2px; height: 28px; }
|
|
.spark-bar { flex: 1; background: var(--accent); border-radius: 1px; min-width: 0; }
|
|
|
|
.mnc-actions { display: flex; gap: 8px; }
|
|
.mnc-btn {
|
|
padding: 5px 12px; border-radius: 6px; border: 1px solid var(--border);
|
|
background: var(--surface-2); color: var(--text); font: 500 .75rem var(--font);
|
|
cursor: pointer; transition: all .15s;
|
|
}
|
|
.mnc-btn:hover { border-color: var(--accent); color: var(--accent); }
|
|
|
|
/* Health claim button */
|
|
.health-claim {
|
|
margin-left: auto;
|
|
padding: 4px 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.4);
|
|
background: transparent; color: #fff; font: 600 .75rem var(--font);
|
|
cursor: pointer; transition: all .15s;
|
|
}
|
|
.health-claim:hover { background: rgba(255,255,255,0.15); }
|
|
|
|
.health-observers { font-size: .8rem; color: var(--text-muted); margin-bottom: 12px; }
|
|
|
|
/* Detail area */
|
|
.home-detail-area { margin-bottom: 16px; }
|
|
|
|
/* Responsive */
|
|
@media (max-width: 640px) {
|
|
.my-nodes-grid { grid-template-columns: 1fr; padding: 0 12px 16px; }
|
|
.mnc-metrics { grid-template-columns: repeat(2, 1fr); }
|
|
.mnc-remove { opacity: 1; }
|
|
}
|