web view
This commit is contained in:
1 parent
eb32643156
commit
cb735d4fa2
8 files changed
+2036
-507
No files matched your search
@@ -4,15 +4,16 @@
|
||||
--text: #1c2430;
|
||||
--muted: #6b7686;
|
||||
--line: #d3d9e1;
|
||||
--track: #e6eaf0;
|
||||
--alive: #2f9e62;
|
||||
--down: #98a2b3;
|
||||
--ok: #3b6fd4;
|
||||
--warn: #e0961e;
|
||||
--panel: rgba(255, 255, 255, 0.92);
|
||||
--warn: #c67a08;
|
||||
--crit: #d64545;
|
||||
--held: #3b6fd4;
|
||||
--unmet: #d64545;
|
||||
--duplicate: #e0961e;
|
||||
--n0: #2f6fdb;
|
||||
--n1: #0e8a8a;
|
||||
--n2: #7a4fd0;
|
||||
--n3: #c03a8e;
|
||||
--n4: #9a6510;
|
||||
--n5: #4b8a2c;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
@@ -22,31 +23,42 @@
|
||||
--text: #e6eaf0;
|
||||
--muted: #93a0b3;
|
||||
--line: #313a47;
|
||||
--track: #2a3340;
|
||||
--alive: #4cc38a;
|
||||
--down: #6b7686;
|
||||
--ok: #6c9cff;
|
||||
--panel: rgba(27, 33, 41, 0.92);
|
||||
--warn: #ffb04a;
|
||||
--crit: #ff6b6b;
|
||||
--held: #6c9cff;
|
||||
--unmet: #ff6b6b;
|
||||
--duplicate: #ffb04a;
|
||||
--n0: #6c9cff;
|
||||
--n1: #3cc7c7;
|
||||
--n2: #ab8cff;
|
||||
--n3: #ff7cc8;
|
||||
--n4: #e0b04a;
|
||||
--n5: #8fd06a;
|
||||
}
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
html, body { height: 100%; }
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0 16px 28px;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100dvh;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font: 15px/1.45 system-ui, sans-serif;
|
||||
}
|
||||
|
||||
header, main, footer { max-width: 900px; margin: 0 auto; }
|
||||
[hidden] { display: none !important; }
|
||||
|
||||
h1 { margin: 22px 0 2px; font-size: 24px; }
|
||||
::selection { background: color-mix(in srgb, var(--n0) 35%, transparent); }
|
||||
|
||||
header { padding: 0 16px 6px; }
|
||||
|
||||
h1 { margin: 10px 0 0; font-size: 22px; }
|
||||
.headline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px; }
|
||||
p { margin: 4px 0; }
|
||||
.summary { color: var(--muted); }
|
||||
.muted { color: var(--muted); font-size: 13px; }
|
||||
@@ -59,61 +71,107 @@ p { margin: 4px 0; }
|
||||
.alert.warn { color: var(--warn); border-color: var(--warn); }
|
||||
.alert.info { color: var(--muted); border-color: var(--line); }
|
||||
|
||||
main { margin-top: 14px; }
|
||||
#graph { width: 100%; height: auto; display: block; margin: 0 auto; }
|
||||
.route-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 10px 0 0; font-size: 14px; }
|
||||
.route-line:empty { display: none; }
|
||||
.route-line .hint { font-size: 12.5px; }
|
||||
.route { padding: 1px 9px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 13px; font-weight: 600; }
|
||||
.route.direct { border-color: var(--muted); }
|
||||
.route.via { border-color: var(--net); background: color-mix(in srgb, var(--net) 16%, transparent); }
|
||||
.route.none { border-color: var(--muted); border-style: dashed; color: var(--muted); }
|
||||
.route.unknown { color: var(--muted); border-style: dashed; }
|
||||
|
||||
.link { stroke: var(--line); stroke-width: 2.5; }
|
||||
.link.down { stroke-dasharray: 6 6; opacity: 0.7; }
|
||||
.link.oneway { stroke: var(--muted); }
|
||||
.arrowhead { fill: var(--muted); }
|
||||
.node.bridge .card { stroke: var(--held); stroke-width: 2; }
|
||||
|
||||
.card { fill: var(--card); stroke: var(--line); stroke-width: 1.5; }
|
||||
.node.self .card { stroke: var(--alive); stroke-width: 2; }
|
||||
.node.down > :not(.card) { opacity: 0.6; }
|
||||
.node.down .card { stroke-dasharray: 6 4; }
|
||||
.dot.alive { fill: var(--alive); }
|
||||
.dot.down { fill: var(--down); }
|
||||
#stage { position: relative; flex: 1; min-height: 260px; overflow: hidden; border-top: 1px solid var(--line); background: var(--bg); }
|
||||
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
|
||||
#map:active { cursor: grabbing; }
|
||||
#map:focus { outline: none; }
|
||||
#world { transform-origin: 0 0; }
|
||||
|
||||
.t-title { fill: var(--text); font-size: 14px; font-weight: 600; }
|
||||
.t-tag { fill: var(--muted); font-size: 11px; text-anchor: end; }
|
||||
.t-sub { fill: var(--muted); font-size: 11px; }
|
||||
.t-label { fill: var(--muted); font-size: 10.5px; letter-spacing: 0.04em; }
|
||||
.t-value { fill: var(--text); font-size: 11px; text-anchor: end; }
|
||||
.t-value.na { fill: var(--muted); }
|
||||
.t-foot { fill: var(--muted); font-size: 10.5px; }
|
||||
.n0 { --net: var(--n0); }
|
||||
.n1 { --net: var(--n1); }
|
||||
.n2 { --net: var(--n2); }
|
||||
.n3 { --net: var(--n3); }
|
||||
.n4 { --net: var(--n4); }
|
||||
.n5 { --net: var(--n5); }
|
||||
|
||||
.track { fill: var(--track); }
|
||||
.fill.ok { fill: var(--ok); }
|
||||
.fill.warn { fill: var(--warn); }
|
||||
.fill.crit { fill: var(--crit); }
|
||||
.region { transition: opacity 0.2s; }
|
||||
.region-box { fill: color-mix(in srgb, var(--net) 9%, var(--bg)); stroke: var(--net); stroke-width: 2; vector-effect: non-scaling-stroke; }
|
||||
.region.selected .region-box { stroke-width: 3.5; }
|
||||
.region.dim { opacity: 0.4; }
|
||||
.region-grab { fill: transparent; cursor: move; }
|
||||
.region-dot { fill: var(--net); pointer-events: none; }
|
||||
.region-title { fill: var(--text); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; }
|
||||
.region-count { fill: var(--muted); font-size: 11.5px; font-weight: 400; }
|
||||
|
||||
.chip rect { fill: transparent; stroke: var(--line); stroke-width: 1.5; }
|
||||
.chip text { fill: var(--muted); font-size: 10.5px; text-anchor: middle; }
|
||||
.chip.held rect { stroke: var(--held); fill: color-mix(in srgb, var(--held) 14%, transparent); }
|
||||
.chip.held text { fill: var(--text); font-weight: 600; }
|
||||
.chip.duplicate rect { stroke: var(--duplicate); fill: color-mix(in srgb, var(--duplicate) 16%, transparent); }
|
||||
.chip.duplicate text { fill: var(--text); font-weight: 600; }
|
||||
.chip.unmet rect { stroke: var(--unmet); stroke-dasharray: 5 3; fill: color-mix(in srgb, var(--unmet) 12%, transparent); }
|
||||
.chip.unmet text { fill: var(--unmet); font-weight: 600; }
|
||||
.chip.unknown rect, .chip.off rect { stroke-dasharray: 2 3; }
|
||||
.chip.more text { fill: var(--muted); }
|
||||
.spoke { fill: none; stroke: var(--net); stroke-width: 2.5; opacity: 0.45; vector-effect: non-scaling-stroke; }
|
||||
.spoke.hidden { opacity: 0; }
|
||||
.spoke.lit { opacity: 0.95; stroke-width: 3.5; }
|
||||
.spoke-end { fill: var(--net); opacity: 0.6; }
|
||||
.spoke-end.used { opacity: 1; }
|
||||
.flow { fill: none; stroke: var(--net); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
|
||||
.arrow path { fill: var(--net); }
|
||||
|
||||
.center-box { fill: var(--card); stroke: var(--line); stroke-width: 1.5; }
|
||||
.center-box.bad { stroke: var(--unmet); }
|
||||
.center-title { text-anchor: middle; }
|
||||
.node { cursor: pointer; outline: none; }
|
||||
.disc { fill: var(--card); stroke: var(--net); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
|
||||
.dot { fill: var(--net); }
|
||||
.halo { fill: none; stroke: none; }
|
||||
.node.down { opacity: 0.65; }
|
||||
.node.down .disc { stroke-dasharray: 4 3; }
|
||||
.node.down .dot { fill: var(--down); }
|
||||
.node.gateway .disc { stroke-width: 4; }
|
||||
.node.none .halo, .node.unknown .halo { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 4 3; }
|
||||
.node.reached .halo { stroke: var(--net); stroke-width: 2; }
|
||||
.node:hover .halo { stroke: var(--muted); stroke-dasharray: none; }
|
||||
.node.origin .halo, .node.selected .halo { stroke: var(--text); stroke-width: 2.5; stroke-dasharray: none; }
|
||||
.node:focus-visible .halo { stroke: var(--text); stroke-width: 3.5; stroke-dasharray: none; }
|
||||
.node.dragging { cursor: grabbing; opacity: 0.85; }
|
||||
.node.dim { opacity: 0.35; }
|
||||
|
||||
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; margin: 10px 0 0; padding: 0; font-size: 12.5px; color: var(--muted); }
|
||||
.swatch { display: inline-block; width: 11px; height: 11px; margin-right: 6px; border-radius: 50%; vertical-align: -1px; }
|
||||
.swatch.alive { background: var(--alive); }
|
||||
.swatch.down { background: var(--down); }
|
||||
.swatch.held, .swatch.unmet, .swatch.duplicate, .swatch.general { border-radius: 6px; background: transparent; border: 2px solid; }
|
||||
.swatch.general { border-color: var(--line); }
|
||||
.swatch.oneway { width: 18px; height: 0; border-radius: 0; border: 0; border-top: 2.5px solid var(--muted); vertical-align: 3px; }
|
||||
.swatch.bridge { border-radius: 4px; background: transparent; border: 2px solid var(--held); }
|
||||
.swatch.link { width: 18px; height: 0; border-radius: 0; border: 0; border-top: 2.5px solid var(--line); vertical-align: 3px; }
|
||||
.swatch.held { border-color: var(--held); }
|
||||
.swatch.unmet { border-color: var(--unmet); border-style: dashed; }
|
||||
.swatch.duplicate { border-color: var(--duplicate); }
|
||||
.l-name, .l-roles, .l-caption { paint-order: stroke; stroke: color-mix(in srgb, var(--net) 9%, var(--bg)); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
|
||||
.l-name { fill: var(--text); font-size: 13px; font-weight: 600; }
|
||||
.l-roles { fill: var(--muted); font-size: 11px; }
|
||||
.l-caption { fill: var(--net); font-size: 11px; font-weight: 600; }
|
||||
.node.none .l-caption, .node.unknown .l-caption { fill: var(--muted); }
|
||||
|
||||
footer { margin-top: 10px; }
|
||||
/* Level of detail: one class on the root, decided by the zoom. */
|
||||
.lod0 .l-name, .lod0 .l-roles, .lod0 .l-caption { display: none; }
|
||||
.lod0 .region-title { font-size: 38px; }
|
||||
.lod0 .region-count { font-size: 24px; }
|
||||
.lod0 .region-dot { r: 12px; }
|
||||
.lod1 .l-roles { display: none; }
|
||||
.lod0 .node.full .l-name, .lod0 .node.full .l-roles, .lod0 .node.full .l-caption, .lod1 .node.full .l-roles { display: inline; }
|
||||
.lod0 .l-caption { display: none; }
|
||||
|
||||
.flow { stroke-dasharray: none; }
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
.flow { stroke-dasharray: 9 7; animation: flow 0.9s linear infinite; }
|
||||
.node { transition: transform 0.25s ease-out; }
|
||||
.node.dragging { transition: none; }
|
||||
.region { transition: opacity 0.2s, transform 0.25s ease-out; }
|
||||
}
|
||||
@keyframes flow { to { stroke-dashoffset: -16; } }
|
||||
|
||||
.controls { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 6px; align-items: center; }
|
||||
.controls button, .legend-open, .legend > button { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; cursor: pointer; }
|
||||
.controls button.text { padding: 0 12px; font-size: 13px; }
|
||||
.controls button:hover, .legend-open:hover, .legend > button:hover { border-color: var(--muted); }
|
||||
.controls button:focus-visible, .legend-open:focus-visible, .legend > button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
|
||||
.controls button.on svg { stroke: var(--n0); }
|
||||
.controls svg, .legend > button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
|
||||
@media (pointer: coarse) { .controls button, .legend-open, .legend > button { min-width: 44px; height: 44px; } }
|
||||
|
||||
.legend { position: absolute; left: 12px; bottom: 12px; max-width: min(360px, calc(100% - 24px)); padding: 10px 12px 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 12.5px; color: var(--muted); }
|
||||
.legend > button { position: absolute; top: 4px; right: 4px; min-width: 28px; height: 28px; border: 0; background: transparent; }
|
||||
.legend ul { list-style: none; margin: 0 24px 6px 0; padding: 0; display: grid; gap: 3px; }
|
||||
.legend p { margin: 0; }
|
||||
.legend-open { position: absolute; left: 12px; bottom: 12px; font-weight: 700; }
|
||||
.stamp { position: absolute; left: 14px; top: 8px; margin: 0; pointer-events: none; }
|
||||
|
||||
.swatch { display: inline-block; width: 11px; height: 11px; margin-right: 8px; border-radius: 50%; vertical-align: -1px; }
|
||||
.swatch.network { border-radius: 4px; background: color-mix(in srgb, var(--n0) 14%, transparent); border: 2px solid var(--n0); }
|
||||
.swatch.node { background: var(--card); border: 2.5px solid var(--n1); }
|
||||
.swatch.gateway { width: 14px; height: 14px; border-radius: 4px; background: var(--card); border: 4px solid var(--n2); vertical-align: -2px; }
|
||||
.swatch.flow { width: 20px; height: 0; border-radius: 0; border: 0; border-top: 3.5px dashed var(--text); vertical-align: 3px; }
|
||||
.swatch.none { background: transparent; border: 2px dashed var(--muted); }
|
||||
|
||||
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
|
||||
Reference in new issue
Block a user