- config.py: env/.env (python-dotenv), defaults = konstanta lama; get_voters & dashboard pakai config - dashboard: ?q= server filter + /api/search JSON (substring, LIKE-escape, rank global via correlated count) - static/app.js: debounced live search; degrades to GET ?q= - static/style.css: input search + responsive (1024/768/480), list→kartu berlabel di mobile - test_dashboard: search/API/rank-global/config tests; .env.example; .env gitignored
310 lines
7.7 KiB
CSS
310 lines
7.7 KiB
CSS
/* DESIGN.md — Bugatti austere system, mapped 1:1 */
|
||
:root {
|
||
/* colors */
|
||
--ink: #ffffff;
|
||
--body: #cccccc;
|
||
--body-strong: #e6e6e6;
|
||
--muted: #999999;
|
||
--muted-soft: #666666;
|
||
--hairline: #262626;
|
||
--hairline-strong: #3a3a3a;
|
||
--canvas: #000000;
|
||
--surface-soft: #0d0d0d;
|
||
--surface-card: #141414;
|
||
--on-dark: #ffffff;
|
||
--link: #c3d9f3;
|
||
|
||
/* typography — DESIGN.md substitutes: Saira Condensed (Display),
|
||
EB Garamond (Text Regular), JetBrains Mono (Monospace) */
|
||
--font-display: 'Saira Condensed', 'Arial Narrow', -apple-system, sans-serif;
|
||
--font-text: 'EB Garamond', Garamond, 'Times New Roman', serif;
|
||
--font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', 'Cascadia Mono', monospace;
|
||
|
||
/* spacing */
|
||
--sp-xxs: 4px; --sp-xs: 8px; --sp-sm: 12px; --sp-md: 16px;
|
||
--sp-lg: 24px; --sp-xl: 40px; --sp-xxl: 64px; --sp-section: 120px;
|
||
|
||
/* layout */
|
||
--max-content: 1280px;
|
||
}
|
||
|
||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||
|
||
html { background: var(--canvas); }
|
||
|
||
body {
|
||
background: var(--canvas);
|
||
color: var(--on-dark);
|
||
font-family: var(--font-text);
|
||
font-weight: 400;
|
||
-webkit-font-smoothing: antialiased;
|
||
min-height: 100vh;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
/* ————— top nav ————— */
|
||
.top-nav {
|
||
height: 56px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 0 var(--sp-lg);
|
||
max-width: var(--max-content);
|
||
width: 100%;
|
||
margin: 0 auto;
|
||
}
|
||
.nav-label {
|
||
font-family: var(--font-mono);
|
||
font-size: 12px;
|
||
letter-spacing: 2px;
|
||
text-transform: uppercase;
|
||
color: var(--on-dark);
|
||
}
|
||
.wordmark {
|
||
font-family: var(--font-display);
|
||
font-size: 14px;
|
||
letter-spacing: 6px;
|
||
text-transform: uppercase;
|
||
color: var(--on-dark);
|
||
}
|
||
|
||
/* ————— page / hero ————— */
|
||
.page { width: 100%; max-width: var(--max-content); margin: 0 auto; flex: 1; }
|
||
|
||
.hero { padding: var(--sp-xxl) var(--sp-lg) var(--sp-lg); }
|
||
.display-xl {
|
||
font-family: var(--font-display);
|
||
font-size: clamp(40px, 6vw, 64px);
|
||
font-weight: 400;
|
||
line-height: 1.1;
|
||
letter-spacing: 4px;
|
||
text-transform: uppercase;
|
||
color: var(--on-dark);
|
||
}
|
||
.caption {
|
||
font-family: var(--font-mono);
|
||
font-size: 11px;
|
||
letter-spacing: 2px;
|
||
text-transform: uppercase;
|
||
color: var(--muted);
|
||
margin-top: var(--sp-md);
|
||
}
|
||
|
||
/* ————— stats band ————— */
|
||
.stats {
|
||
display: grid;
|
||
grid-template-columns: repeat(3, 1fr);
|
||
border-top: 1px solid var(--hairline);
|
||
border-bottom: 1px solid var(--hairline);
|
||
margin: 0 var(--sp-lg) var(--sp-xl);
|
||
}
|
||
.spec-cell {
|
||
padding: var(--sp-lg) var(--sp-md);
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: var(--sp-xs);
|
||
}
|
||
.spec-cell + .spec-cell { border-left: 1px solid var(--hairline); }
|
||
.cell-value {
|
||
font-family: var(--font-display);
|
||
font-size: 20px;
|
||
letter-spacing: 1px;
|
||
text-transform: uppercase;
|
||
color: var(--on-dark);
|
||
}
|
||
.cell-label {
|
||
font-family: var(--font-mono);
|
||
font-size: 11px;
|
||
letter-spacing: 2px;
|
||
text-transform: uppercase;
|
||
color: var(--muted);
|
||
}
|
||
|
||
/* ————— search ————— */
|
||
.search {
|
||
display: flex;
|
||
align-items: flex-end;
|
||
gap: var(--sp-md);
|
||
margin: 0 var(--sp-lg) var(--sp-sm);
|
||
max-width: 560px;
|
||
}
|
||
.search-input {
|
||
background: transparent;
|
||
color: var(--on-dark);
|
||
font-family: var(--font-text);
|
||
font-size: 16px;
|
||
border: none;
|
||
border-bottom: 1px solid var(--hairline-strong);
|
||
border-radius: 0;
|
||
padding: var(--sp-sm) 0;
|
||
height: 44px;
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
.search-input::placeholder { color: var(--muted); }
|
||
.search-input:focus { outline: none; border-bottom-color: var(--on-dark); }
|
||
button.pill {
|
||
background: transparent;
|
||
cursor: pointer;
|
||
}
|
||
.clear {
|
||
font-family: var(--font-mono);
|
||
font-size: 12px;
|
||
letter-spacing: 2px;
|
||
text-transform: uppercase;
|
||
color: var(--link);
|
||
text-decoration: none;
|
||
padding-bottom: 12px;
|
||
white-space: nowrap;
|
||
}
|
||
.search-result { margin: 0 var(--sp-lg); }
|
||
.search-result:empty { display: none; }
|
||
|
||
/* ————— spec-list ————— */
|
||
.spec-list { margin: var(--sp-md) var(--sp-lg) 0; border-top: 1px solid var(--hairline-strong); }
|
||
.list-header,
|
||
.list-row {
|
||
display: grid;
|
||
grid-template-columns: 72px 1fr 200px 1fr;
|
||
gap: var(--sp-lg);
|
||
align-items: baseline;
|
||
padding: var(--sp-lg) var(--sp-sm);
|
||
border-bottom: 1px solid var(--hairline);
|
||
}
|
||
.list-header {
|
||
font-family: var(--font-mono);
|
||
font-size: 11px;
|
||
letter-spacing: 2px;
|
||
text-transform: uppercase;
|
||
color: var(--muted);
|
||
padding-top: var(--sp-md);
|
||
}
|
||
.list-row:nth-child(odd) { background: var(--surface-soft); }
|
||
.rank,
|
||
.weight {
|
||
font-family: var(--font-mono);
|
||
font-size: 11px;
|
||
letter-spacing: 1.5px;
|
||
color: var(--muted);
|
||
}
|
||
.owner {
|
||
font-family: var(--font-display);
|
||
font-size: 20px;
|
||
letter-spacing: 1px;
|
||
color: var(--on-dark);
|
||
overflow-wrap: anywhere;
|
||
}
|
||
.stake {
|
||
font-family: var(--font-display);
|
||
font-size: 20px;
|
||
letter-spacing: 1px;
|
||
text-align: right;
|
||
color: var(--on-dark);
|
||
font-variant-numeric: tabular-nums;
|
||
}
|
||
.empty {
|
||
font-family: var(--font-mono);
|
||
font-size: 12px;
|
||
letter-spacing: 2px;
|
||
text-transform: uppercase;
|
||
color: var(--muted);
|
||
padding: var(--sp-xxl) var(--sp-sm);
|
||
}
|
||
|
||
/* ————— pager ————— */
|
||
.pager {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: var(--sp-lg);
|
||
padding: var(--sp-xxl) var(--sp-lg);
|
||
}
|
||
.pill {
|
||
font-family: var(--font-mono);
|
||
font-size: 14px;
|
||
letter-spacing: 2.5px;
|
||
text-transform: uppercase;
|
||
text-decoration: none;
|
||
color: var(--on-dark);
|
||
border: 1px solid var(--on-dark);
|
||
border-radius: 9999px;
|
||
padding: 14px 32px;
|
||
height: 44px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
}
|
||
.pill-disabled {
|
||
opacity: 0.25;
|
||
pointer-events: none;
|
||
border-color: var(--muted-soft);
|
||
}
|
||
.page-count {
|
||
font-family: var(--font-mono);
|
||
font-size: 12px;
|
||
letter-spacing: 2px;
|
||
color: var(--muted);
|
||
}
|
||
|
||
/* ————— footer ————— */
|
||
.footer {
|
||
padding: var(--sp-xxl) var(--sp-lg);
|
||
margin-top: var(--sp-section);
|
||
border-top: 1px solid var(--hairline);
|
||
text-align: center;
|
||
font-family: var(--font-mono);
|
||
font-size: 11px;
|
||
letter-spacing: 2px;
|
||
text-transform: uppercase;
|
||
color: var(--muted-soft);
|
||
}
|
||
|
||
/* ————— tablet (768–1024px) ————— */
|
||
@media (max-width: 1024px) {
|
||
.list-header,
|
||
.list-row { grid-template-columns: 56px 1fr 160px 1fr; gap: var(--sp-md); }
|
||
.spec-list, .stats, .search, .search-result { margin-left: var(--sp-md); margin-right: var(--sp-md); }
|
||
}
|
||
|
||
/* ————— mobile (<768px): list → kartu berlabel ————— */
|
||
@media (max-width: 768px) {
|
||
.stats { grid-template-columns: 1fr; }
|
||
.spec-cell + .spec-cell { border-left: none; border-top: 1px solid var(--hairline); }
|
||
|
||
.search { flex-direction: column; align-items: stretch; }
|
||
.search .pill { justify-content: center; width: 100%; }
|
||
|
||
.list-header { display: none; }
|
||
.list-row {
|
||
grid-template-columns: 48px 1fr;
|
||
gap: var(--sp-xxs) var(--sp-sm);
|
||
padding: var(--sp-lg) var(--sp-sm);
|
||
}
|
||
.list-row .rank { grid-row: 1 / span 3; grid-column: 1; align-self: start; padding-top: 6px; }
|
||
.list-row .owner { grid-column: 2; font-size: 18px; }
|
||
.list-row .stake,
|
||
.list-row .weight { grid-column: 2; }
|
||
.list-row .stake { text-align: left; }
|
||
.list-row .stake::before,
|
||
.list-row .weight::before {
|
||
content: attr(data-label);
|
||
display: block;
|
||
font-family: var(--font-mono);
|
||
font-size: 11px;
|
||
letter-spacing: 2px;
|
||
text-transform: uppercase;
|
||
color: var(--muted);
|
||
margin-bottom: 2px;
|
||
}
|
||
|
||
.pager { flex-direction: column; gap: var(--sp-md); }
|
||
.pager .pill { justify-content: center; width: 100%; }
|
||
.page-count { order: -1; }
|
||
}
|
||
|
||
/* ————— layar sangat kecil (<480px): sembunyikan nav-label ————— */
|
||
@media (max-width: 480px) {
|
||
.nav-label { display: none; }
|
||
.hero { padding-top: var(--sp-lg); }
|
||
}
|