Redesign dashboard with weighted metrics, compact map, share bars and empty-state onboarding

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
TomandClaude Opus 5.5 committed 2026-11-15 19:29:11 +01:00
1 parent de22f035dc
commit 31bb8b21c2
6 files changed
+333 -92

No files matched your search

+231 -40
View File
@@ -47,21 +47,6 @@ h1:focus {
padding: 24px 16px 48px;
}
.top {
display: flex;
flex-wrap: wrap;
align-items: baseline;
justify-content: space-between;
gap: 8px;
margin-bottom: 20px;
}
.top h1 {
margin: 0;
font-size: 22px;
color: var(--accent);
}
h2 {
margin: 0 0 12px;
font-size: 15px;
@@ -73,7 +58,7 @@ h2 {
.metrics {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
grid-template-columns: repeat(2, minmax(0, 1.4fr)) repeat(3, minmax(0, 1fr));
gap: 12px;
margin-bottom: 16px;
}
@@ -82,29 +67,138 @@ h2 {
.card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 14px 16px;
border-radius: 10px;
padding: 16px 18px;
}
.metric {
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
}
.metric .label {
display: block;
color: var(--muted);
font-size: 12px;
font-weight: 500;
}
.metric .value {
margin-top: 4px;
font-size: 22px;
font-weight: 600;
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.metric .sub {
color: var(--muted);
font-size: 12px;
}
.metric .value {
display: block;
margin-top: 4px;
font-size: 24px;
font-weight: 600;
font-variant-numeric: tabular-nums;
.metric-hero .value {
font-size: 32px;
line-height: 1.15;
}
.metric-hero.live {
border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}
.metric-hero.live .value {
color: var(--accent);
}
.metric-hero.live .label::before,
.live-dot {
content: "";
display: inline-block;
width: 8px;
height: 8px;
margin-right: 7px;
border-radius: 50%;
background: var(--accent);
vertical-align: 1px;
animation: pulse 2s ease-in-out infinite;
}
.live-dot {
background: var(--ok);
}
@keyframes pulse {
50% {
opacity: 0.35;
}
}
@media (prefers-reduced-motion: reduce) {
.metric-hero.live .label::before,
.live-dot {
animation: none;
}
}
.card-head {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 8px 16px;
margin-bottom: 12px;
}
.card-head h2 {
margin: 0;
}
.card-head .hint {
margin: 0;
}
.onboarding {
border-style: dashed;
}
.onboarding p {
margin: 0 0 12px;
}
.onboarding ol {
display: grid;
gap: 8px;
margin: 0;
padding-left: 20px;
}
code {
padding: 1px 5px;
border-radius: 4px;
background: var(--bg);
font: 12.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.origin {
display: grid;
grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
gap: 16px;
align-items: start;
}
.origin > * {
min-width: 0;
}
.tops {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 16px;
margin-bottom: 16px;
}
.tops > :last-child {
grid-column: 1 / -1;
}
.tops > * {
@@ -289,7 +383,7 @@ tr[data-expand] {
}
tr[data-expand]:hover td {
background: color-mix(in srgb, var(--text) 4%, transparent);
background-color: color-mix(in srgb, var(--text) 4%, transparent);
}
tr[data-expand]:focus-visible {
@@ -298,7 +392,7 @@ tr[data-expand]:focus-visible {
}
tr[data-expand].open td {
background: color-mix(in srgb, var(--accent) 7%, transparent);
background-color: color-mix(in srgb, var(--accent) 7%, transparent);
}
tr.open .clip {
@@ -343,13 +437,15 @@ tr.open .clip {
.nav {
display: flex;
align-items: center;
gap: 16px;
margin-bottom: 20px;
gap: 4px;
margin-bottom: 28px;
padding-bottom: 12px;
border-bottom: 1px solid var(--border);
}
.nav a {
padding: 6px 12px;
border-radius: 6px;
color: var(--muted);
text-decoration: none;
font-weight: 500;
@@ -360,6 +456,31 @@ tr.open .clip {
color: var(--text);
}
.nav a.active {
background: var(--surface);
box-shadow: inset 0 -2px 0 var(--accent);
}
.nav .brand {
display: flex;
align-items: center;
gap: 8px;
margin-right: 16px;
padding-left: 0;
color: var(--text);
font-size: 16px;
font-weight: 700;
letter-spacing: -0.01em;
}
.brand-mark {
width: 14px;
height: 14px;
border-radius: 4px;
background: var(--accent);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.nav .logout {
margin-left: auto;
}
@@ -488,10 +609,6 @@ tbody th {
margin-bottom: 16px;
}
.top h1 {
margin: 0;
}
.world-map {
display: block;
width: 100%;
@@ -559,13 +676,41 @@ tbody th {
.map-legend {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 4px;
margin-top: 8px;
color: var(--muted);
font-size: 12px;
}
.map-legend .level-0 {
margin-right: 6px;
}
.map-wrap {
position: relative;
}
.map-empty {
position: absolute;
left: 50%;
bottom: 12%;
transform: translateX(-50%);
margin: 0;
padding: 8px 14px;
border: 1px solid var(--border);
border-radius: 999px;
background: var(--surface);
color: var(--muted);
font-size: 13px;
white-space: nowrap;
}
td.bar {
background-image: linear-gradient(to right, color-mix(in srgb, var(--accent) 70%, transparent) var(--share), transparent var(--share));
background-repeat: no-repeat;
background-size: 100% 3px;
background-position: 0 calc(100% - 3px);
}
.map-legend .swatch {
width: 18px;
height: 10px;
@@ -596,12 +741,58 @@ button.danger {
background: var(--bad);
}
@media (max-width: 860px) {
@media (max-width: 1099px) {
.metrics {
grid-template-columns: repeat(6, minmax(0, 1fr));
}
.metric {
grid-column: span 2;
}
.metric-hero {
grid-column: span 3;
}
.origin,
.tops {
grid-template-columns: minmax(0, 1fr);
}
}
@media (max-width: 599px) {
.metrics {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.metric,
.metric-hero {
grid-column: span 1;
}
.metric:last-child {
grid-column: span 2;
}
.metric-hero .value {
font-size: 26px;
}
.nav .brand {
margin-right: 4px;
font-size: 0;
}
.map-empty {
position: static;
transform: none;
margin-top: 8px;
white-space: normal;
border-radius: 8px;
text-align: center;
}
}
select {
width: 100%;
padding: 8px 10px;
@@ -612,16 +803,16 @@ select {
font: inherit;
}
.settings-head {
.page-head {
margin-bottom: 24px;
}
.settings-head h1 {
.page-head h1 {
margin: 0 0 6px;
font-size: 24px;
}
.settings-head p {
.page-head p {
margin: 0;
color: var(--muted);
}