Design refresh: warm graphite palette, green accent, sentence-case labels, LLR gauge for SPRT tests
This commit is contained in:
1 parent
5c65feb27d
commit
dfa7687247
4 files changed
+266
-4
No files matched your search
@@ -0,0 +1,235 @@
|
||||
/* ==========================================================================
|
||||
OpenBench - design refresh
|
||||
|
||||
Loaded last (after style.css, ux.css, board.css). Only overrides tokens and
|
||||
a handful of rules, so the older theme stays intact. Drop the <link> in
|
||||
base.html to revert everything in one step.
|
||||
|
||||
Direction: warm graphite surfaces, bone-coloured text, a single board-green
|
||||
accent. Colour is reserved for results (green / amber / red). The LLR gauge
|
||||
on running SPRT tests is the one distinctive element; the rest stays quiet.
|
||||
========================================================================== */
|
||||
|
||||
:root {
|
||||
/* Surfaces */
|
||||
--color1: #14161A;
|
||||
--color2: #1A1D22;
|
||||
--color3: #23272D;
|
||||
--surface-head: #1F2227;
|
||||
--surface-hover: #252A30;
|
||||
|
||||
/* Lines */
|
||||
--line: #2A2E35;
|
||||
--line-strong: #3A3F48;
|
||||
|
||||
/* Text */
|
||||
--color-font1: #EDEAE3;
|
||||
--color-font2: #C9C6BE;
|
||||
--color-font3: #A9CDB3;
|
||||
--muted: #8C8F96;
|
||||
|
||||
/* Accent: board green. Buttons use the darker value so white text passes AA. */
|
||||
--accent: #4F8160;
|
||||
--accent-hover: #6BA17D;
|
||||
--accent-soft: rgba(94, 139, 106, 0.16);
|
||||
--link: #8FC3A0;
|
||||
--link-hover: #B9E0C6;
|
||||
|
||||
/* Results */
|
||||
--ok: #6EDB9A;
|
||||
--warn: #E8B84A;
|
||||
--bad: #EF7B72;
|
||||
--orange: #E8955A;
|
||||
--purple: #B79FE0;
|
||||
--purple-soft: rgba(183, 159, 224, 0.14);
|
||||
|
||||
--font-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
|
||||
--radius: 3px;
|
||||
--shadow-card: none;
|
||||
}
|
||||
|
||||
::selection {
|
||||
background: rgba(94, 139, 106, 0.4);
|
||||
}
|
||||
|
||||
/* ---------- Chrome ---------- */
|
||||
|
||||
#topbar {
|
||||
background: rgba(20, 22, 26, 0.92);
|
||||
}
|
||||
|
||||
#topbar .brand-name {
|
||||
font-weight: 650;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 26px;
|
||||
font-weight: 600;
|
||||
letter-spacing: -0.015em;
|
||||
}
|
||||
|
||||
/* ---------- Labels: sentence case instead of tracked capitals ---------- */
|
||||
|
||||
#sidebar .nav-title,
|
||||
.card-title,
|
||||
.badge,
|
||||
.flag,
|
||||
#content .table-header th,
|
||||
#content .table-small-header th,
|
||||
.stat-label,
|
||||
.ev-meta dt,
|
||||
.ev-facts dt,
|
||||
.ev-player small,
|
||||
.ev-sel-stats span {
|
||||
text-transform: none;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
#sidebar .nav-title {
|
||||
font-size: 12.5px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
color: var(--color-font2);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
#content .table-header th,
|
||||
#content .table-small-header th {
|
||||
font-size: 12.5px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* The header's accent stripe carried no information */
|
||||
#content .table-header th:first-child {
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
.stat-label,
|
||||
.ev-meta dt,
|
||||
.ev-facts dt,
|
||||
.ev-player small {
|
||||
font-size: 12.5px;
|
||||
}
|
||||
|
||||
.flag {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.badge {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* ---------- Surfaces: borders instead of shadows ---------- */
|
||||
|
||||
.card,
|
||||
.stat-card {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* Fleet and queue counters: number first, icon as a quiet marker */
|
||||
.stat-card {
|
||||
flex-direction: row-reverse;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.stat-icon {
|
||||
width: auto;
|
||||
height: auto;
|
||||
background: none !important;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
font-size: 26px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* ---------- Colour tokens that were hardcoded in older files ---------- */
|
||||
|
||||
.badge-info {
|
||||
border-color: rgba(94, 139, 106, 0.45);
|
||||
color: #A9D4B7;
|
||||
}
|
||||
|
||||
#content a.seg-btn.active {
|
||||
box-shadow: inset 0 0 0 1px rgba(94, 139, 106, 0.5);
|
||||
}
|
||||
|
||||
.ev-move.is-active {
|
||||
border-color: rgba(94, 139, 106, 0.5);
|
||||
}
|
||||
|
||||
.ev-white .ev-piece { background-color: #EDEAE3; }
|
||||
.ev-black .ev-piece { background-color: #14161A; }
|
||||
|
||||
/* ==========================================================================
|
||||
LLR gauge (running SPRT tests)
|
||||
|
||||
The track runs from the lower bound (left) to the upper bound (right).
|
||||
The tall tick marks LLR = 0; the fill grows from it towards the current
|
||||
LLR, so direction and distance to a decision read at a glance.
|
||||
========================================================================== */
|
||||
|
||||
.llr {
|
||||
position: relative;
|
||||
min-width: 150px;
|
||||
height: 6px;
|
||||
margin-top: 10px;
|
||||
background-color: var(--line);
|
||||
border-radius: 1px;
|
||||
}
|
||||
|
||||
/* Bound markers at both ends */
|
||||
.llr::before,
|
||||
.llr::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -3px;
|
||||
bottom: -3px;
|
||||
width: 2px;
|
||||
background-color: var(--line-strong);
|
||||
}
|
||||
|
||||
.llr::before { left: 0; }
|
||||
.llr::after { right: 0; }
|
||||
|
||||
.llr-fill {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
background-color: var(--muted);
|
||||
}
|
||||
|
||||
.llr-pos .llr-fill { background-color: var(--ok); }
|
||||
.llr-neg .llr-fill { background-color: var(--bad); }
|
||||
|
||||
.llr-zero {
|
||||
position: absolute;
|
||||
top: -4px;
|
||||
bottom: -4px;
|
||||
width: 1px;
|
||||
background-color: var(--color-font2);
|
||||
}
|
||||
|
||||
.llr-scale {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 5px;
|
||||
color: var(--muted);
|
||||
font-family: var(--font-mono);
|
||||
font-size: 10.5px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.llr-scale b {
|
||||
color: var(--color-font1);
|
||||
font-weight: 500;
|
||||
}
|
||||
@@ -57,7 +57,27 @@ def progress_info(test):
|
||||
else:
|
||||
fraction, tone = 0.0, 'neutral'
|
||||
|
||||
return { 'pct' : int(max(0.0, min(1.0, fraction)) * 100), 'tone' : tone }
|
||||
info = { 'pct' : int(max(0.0, min(1.0, fraction)) * 100), 'tone' : tone }
|
||||
|
||||
# Data for the LLR gauge: the track runs lower -> upper bound, the fill
|
||||
# grows from LLR = 0 towards the current LLR. Strings are formatted here
|
||||
# so locale settings can never turn a decimal point into a comma.
|
||||
|
||||
if lower < 0 < upper:
|
||||
span = upper - lower
|
||||
pos = max(0.0, min(1.0, (current - lower) / span)) * 100
|
||||
zero = (0.0 - lower) / span * 100
|
||||
info.update({
|
||||
'gauge' : True,
|
||||
'llr' : '%.2f' % current,
|
||||
'lower' : '%.2f' % lower,
|
||||
'upper' : '%.2f' % upper,
|
||||
'zero' : '%.1f' % zero,
|
||||
'left' : '%.1f' % min(pos, zero),
|
||||
'width' : '%.1f' % abs(pos - zero),
|
||||
})
|
||||
|
||||
return info
|
||||
|
||||
if test.max_games:
|
||||
fraction = test.games / float(test.max_games)
|
||||
|
||||
@@ -6,7 +6,13 @@
|
||||
{% if test.error %}<span class="flag flag-error" title="Crash or illegal move">crash</span>{% endif %}
|
||||
{% if test|test_is_fischer %}<span class="flag flag-frc" title="Fischer random chess">frc</span>{% endif %}
|
||||
{% with progress=test|progress_info %}
|
||||
{% if progress %}
|
||||
{% if progress.gauge %}
|
||||
<div class="llr llr-{{ progress.tone }}" role="meter" aria-label="LLR" aria-valuemin="{{ progress.lower }}" aria-valuemax="{{ progress.upper }}" aria-valuenow="{{ progress.llr }}" title="LLR {{ progress.llr }} (bounds {{ progress.lower }} to {{ progress.upper }})">
|
||||
<span class="llr-fill" style="left: {{ progress.left }}%; width: {{ progress.width }}%"></span>
|
||||
<span class="llr-zero" style="left: {{ progress.zero }}%"></span>
|
||||
</div>
|
||||
<div class="llr-scale"><span>{{ progress.lower }}</span><b>{{ progress.llr }}</b><span>{{ progress.upper }}</span></div>
|
||||
{% elif progress %}
|
||||
<div class="ob-progress ob-progress-{{ progress.tone }}" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="{{ progress.pct }}" title="{{ progress.pct }}%"><span style="width: {{ progress.pct }}%"></span></div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="theme-color" content="#0B0E14">
|
||||
<meta name="theme-color" content="#14161A">
|
||||
<meta name="color-scheme" content="dark">
|
||||
|
||||
<link rel="icon" type="image/svg+xml" href="{% static 'logo.svg' %}?{{ static_version }}">
|
||||
@@ -17,12 +17,13 @@
|
||||
<link rel="stylesheet" href="{% static 'paging.css' %}?{{ static_version }}">
|
||||
<link rel="stylesheet" href="{% static 'ux.css' %}?{{ static_version }}">
|
||||
<link rel="stylesheet" href="{% static 'board.css' %}?{{ static_version }}">
|
||||
<link rel="stylesheet" href="{% static 'refresh.css' %}?{{ static_version }}">
|
||||
|
||||
<link href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css' rel='stylesheet'>
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
|
||||
|
||||
<title>RektBench</title>
|
||||
|
||||
|
||||
Reference in new issue
Block a user