refactor: replay ui to terminal style
This commit is contained in:
@@ -733,3 +733,614 @@ h2 { margin-bottom: 12px; color: var(--gold); font-size: 15px; }
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*, *::before, *::after { animation: none !important; transition: none !important; }
|
||||
}
|
||||
|
||||
/* =========================================================================
|
||||
Terminal replay UI
|
||||
========================================================================= */
|
||||
|
||||
:root {
|
||||
color-scheme: dark;
|
||||
--bg: #020617;
|
||||
--bg-grid: rgba(34, 197, 94, 0.07);
|
||||
--panel: #07111f;
|
||||
--panel-strong: #0d1726;
|
||||
--terminal: #030712;
|
||||
--terminal-line: #1f2a37;
|
||||
--text: #f8fafc;
|
||||
--muted: #94a3b8;
|
||||
--muted-2: #64748b;
|
||||
--accent: #22c55e;
|
||||
--accent-strong: #86efac;
|
||||
--accent-ink: #04130a;
|
||||
--amber: #f59e0b;
|
||||
--red-term: #ef4444;
|
||||
--blue-term: #38bdf8;
|
||||
--border: #263445;
|
||||
--border-strong: #3d5268;
|
||||
--shadow-term: rgba(0, 0, 0, 0.38);
|
||||
--radius: 8px;
|
||||
--mono: "Fira Code", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
:root {
|
||||
color-scheme: light;
|
||||
--bg: #f5f7fb;
|
||||
--bg-grid: rgba(4, 120, 87, 0.08);
|
||||
--panel: #ffffff;
|
||||
--panel-strong: #f1f5f9;
|
||||
--terminal: #fbfdff;
|
||||
--terminal-line: #d8e0ea;
|
||||
--text: #0f172a;
|
||||
--muted: #475569;
|
||||
--muted-2: #64748b;
|
||||
--accent: #047857;
|
||||
--accent-strong: #065f46;
|
||||
--accent-ink: #ecfdf5;
|
||||
--amber: #b45309;
|
||||
--red-term: #b91c1c;
|
||||
--blue-term: #0369a1;
|
||||
--border: #cbd5e1;
|
||||
--border-strong: #94a3b8;
|
||||
--shadow-term: rgba(15, 23, 42, 0.12);
|
||||
}
|
||||
}
|
||||
|
||||
:root[data-theme="dark"] {
|
||||
color-scheme: dark;
|
||||
--bg: #020617;
|
||||
--bg-grid: rgba(34, 197, 94, 0.07);
|
||||
--panel: #07111f;
|
||||
--panel-strong: #0d1726;
|
||||
--terminal: #030712;
|
||||
--terminal-line: #1f2a37;
|
||||
--text: #f8fafc;
|
||||
--muted: #94a3b8;
|
||||
--muted-2: #64748b;
|
||||
--accent: #22c55e;
|
||||
--accent-strong: #86efac;
|
||||
--accent-ink: #04130a;
|
||||
--amber: #f59e0b;
|
||||
--red-term: #ef4444;
|
||||
--blue-term: #38bdf8;
|
||||
--border: #263445;
|
||||
--border-strong: #3d5268;
|
||||
--shadow-term: rgba(0, 0, 0, 0.38);
|
||||
}
|
||||
|
||||
:root[data-theme="light"] {
|
||||
color-scheme: light;
|
||||
--bg: #f5f7fb;
|
||||
--bg-grid: rgba(4, 120, 87, 0.08);
|
||||
--panel: #ffffff;
|
||||
--panel-strong: #f1f5f9;
|
||||
--terminal: #fbfdff;
|
||||
--terminal-line: #d8e0ea;
|
||||
--text: #0f172a;
|
||||
--muted: #475569;
|
||||
--muted-2: #64748b;
|
||||
--accent: #047857;
|
||||
--accent-strong: #065f46;
|
||||
--accent-ink: #ecfdf5;
|
||||
--amber: #b45309;
|
||||
--red-term: #b91c1c;
|
||||
--blue-term: #0369a1;
|
||||
--border: #cbd5e1;
|
||||
--border-strong: #94a3b8;
|
||||
--shadow-term: rgba(15, 23, 42, 0.12);
|
||||
}
|
||||
|
||||
html { min-height: 100%; }
|
||||
|
||||
body {
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
color: var(--text);
|
||||
font-family: var(--mono);
|
||||
font-size: 14px;
|
||||
letter-spacing: 0;
|
||||
background:
|
||||
linear-gradient(var(--bg-grid) 1px, transparent 1px) 0 0 / 28px 28px,
|
||||
linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px) 0 0 / 28px 28px,
|
||||
var(--bg);
|
||||
image-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: auto;
|
||||
}
|
||||
|
||||
button,
|
||||
input,
|
||||
select {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
button,
|
||||
.file-btn {
|
||||
min-height: 38px;
|
||||
border: 1px solid var(--border-strong);
|
||||
border-radius: 6px;
|
||||
color: var(--text);
|
||||
background: var(--panel-strong);
|
||||
box-shadow: none;
|
||||
cursor: pointer;
|
||||
transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
|
||||
}
|
||||
|
||||
button:hover,
|
||||
.file-btn:hover {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent-strong);
|
||||
filter: none;
|
||||
}
|
||||
|
||||
button:active,
|
||||
.file-btn:active {
|
||||
transform: none;
|
||||
box-shadow: inset 0 0 0 1px var(--accent);
|
||||
}
|
||||
|
||||
button:disabled {
|
||||
opacity: 0.45;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.primary-btn {
|
||||
color: var(--accent-ink);
|
||||
background: var(--accent);
|
||||
border-color: var(--accent);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.primary-btn:hover {
|
||||
color: var(--accent-ink);
|
||||
background: var(--accent-strong);
|
||||
}
|
||||
|
||||
input,
|
||||
select {
|
||||
width: 100%;
|
||||
min-height: 38px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
color: var(--text);
|
||||
background: var(--terminal);
|
||||
padding: 8px 10px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
input[type="range"] {
|
||||
padding: 0;
|
||||
accent-color: var(--accent);
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
width: 16px;
|
||||
min-height: 16px;
|
||||
accent-color: var(--accent);
|
||||
}
|
||||
|
||||
button:focus-visible,
|
||||
input:focus-visible,
|
||||
select:focus-visible,
|
||||
.file-btn:focus-within,
|
||||
.terminal-screen:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
h1,
|
||||
p,
|
||||
dl {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: var(--text);
|
||||
font-size: clamp(20px, 2vw, 28px);
|
||||
font-weight: 700;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.app-shell {
|
||||
width: min(1680px, 100%);
|
||||
margin: 0 auto;
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.terminal-header,
|
||||
.terminal-panel {
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
background: color-mix(in srgb, var(--panel) 92%, transparent);
|
||||
box-shadow: 0 18px 48px var(--shadow-term);
|
||||
}
|
||||
|
||||
.terminal-header {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.window-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-height: 34px;
|
||||
padding: 0 14px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
color: var(--muted);
|
||||
background: var(--panel-strong);
|
||||
}
|
||||
|
||||
.window-dot {
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.window-dot.red { background: var(--red-term); }
|
||||
.window-dot.yellow { background: var(--amber); }
|
||||
.window-dot.green { background: var(--accent); }
|
||||
|
||||
.window-title {
|
||||
margin-left: 6px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.title-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: end;
|
||||
gap: 18px;
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
#subtitle {
|
||||
margin-top: 6px;
|
||||
color: var(--muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.status-strip {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
align-items: end;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.status-pill,
|
||||
.prompt-chip,
|
||||
.frame-label {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
min-height: 28px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 999px;
|
||||
padding: 4px 10px;
|
||||
color: var(--accent-strong);
|
||||
background: color-mix(in srgb, var(--accent) 12%, transparent);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.theme-control {
|
||||
display: grid;
|
||||
gap: 4px;
|
||||
color: var(--muted);
|
||||
font-size: 11px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.theme-control select {
|
||||
min-height: 28px;
|
||||
padding: 3px 28px 3px 8px;
|
||||
}
|
||||
|
||||
.terminal-grid {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) minmax(300px, 380px);
|
||||
grid-template-areas:
|
||||
"source display log"
|
||||
"controls display log"
|
||||
"summary display log";
|
||||
gap: 14px;
|
||||
margin-top: 14px;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.source-panel { grid-area: source; }
|
||||
.controls-panel { grid-area: controls; }
|
||||
.summary-panel { grid-area: summary; }
|
||||
.display-panel { grid-area: display; min-width: 0; }
|
||||
.log-panel { grid-area: log; min-width: 0; }
|
||||
|
||||
.terminal-panel {
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.panel-title {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
margin-bottom: 14px;
|
||||
color: var(--text);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.panel-title span {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.terminal-panel label {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
margin-bottom: 12px;
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.button-row,
|
||||
.transport-row,
|
||||
.auto-grid {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.button-row {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
|
||||
.transport-row {
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.auto-grid {
|
||||
grid-template-columns: minmax(0, 1fr) 92px;
|
||||
align-items: end;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.toggle-line {
|
||||
display: flex !important;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
min-height: 38px;
|
||||
}
|
||||
|
||||
.file-btn {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.file-btn input {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.progress-shell {
|
||||
height: 10px;
|
||||
margin-top: 14px;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 999px;
|
||||
background: var(--terminal);
|
||||
}
|
||||
|
||||
#progressBar {
|
||||
width: 0;
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, var(--accent), var(--blue-term), var(--amber));
|
||||
transition: width 180ms linear;
|
||||
}
|
||||
|
||||
.stat-list {
|
||||
display: grid;
|
||||
gap: 9px;
|
||||
}
|
||||
|
||||
.stat-list div {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(80px, 1fr) minmax(0, 1.4fr);
|
||||
gap: 12px;
|
||||
padding-bottom: 9px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.stat-list dt {
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.stat-list dd {
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
color: var(--text);
|
||||
text-align: right;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.display-panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.display-head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.display-head > div {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.frame-label {
|
||||
color: var(--muted);
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.terminal-screen {
|
||||
flex: 1 1 auto;
|
||||
min-height: clamp(460px, 68vh, 780px);
|
||||
overflow: auto;
|
||||
border: 1px solid var(--terminal-line);
|
||||
border-radius: var(--radius);
|
||||
background:
|
||||
linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 120px),
|
||||
var(--terminal);
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--accent) var(--terminal);
|
||||
}
|
||||
|
||||
.table-output {
|
||||
min-width: 860px;
|
||||
margin: 0;
|
||||
padding: 18px;
|
||||
color: var(--text);
|
||||
font-family: var(--mono);
|
||||
font-size: clamp(12px, 0.86vw, 14px);
|
||||
line-height: 1.55;
|
||||
letter-spacing: 0;
|
||||
white-space: pre;
|
||||
tab-size: 2;
|
||||
}
|
||||
|
||||
.terminal-screen::-webkit-scrollbar,
|
||||
.event-log::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.terminal-screen::-webkit-scrollbar-track,
|
||||
.event-log::-webkit-scrollbar-track {
|
||||
background: var(--terminal);
|
||||
}
|
||||
|
||||
.terminal-screen::-webkit-scrollbar-thumb,
|
||||
.event-log::-webkit-scrollbar-thumb {
|
||||
border: 2px solid var(--terminal);
|
||||
border-radius: 999px;
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
.event-log {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
max-height: clamp(460px, 78vh, 860px);
|
||||
margin: 0;
|
||||
padding: 0 2px 0 0;
|
||||
overflow: auto;
|
||||
list-style: none;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--accent) var(--terminal);
|
||||
}
|
||||
|
||||
.event-log li {
|
||||
border: 1px solid var(--border);
|
||||
border-left: 3px solid var(--border-strong);
|
||||
border-radius: 6px;
|
||||
padding: 8px 10px;
|
||||
color: var(--muted);
|
||||
background: var(--terminal);
|
||||
line-height: 1.45;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.event-log li.current {
|
||||
border-left-color: var(--accent);
|
||||
color: var(--text);
|
||||
background: color-mix(in srgb, var(--accent) 10%, var(--terminal));
|
||||
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
|
||||
}
|
||||
|
||||
.event-log li.past {
|
||||
opacity: 0.72;
|
||||
}
|
||||
|
||||
::selection {
|
||||
color: var(--accent-ink);
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
@media (max-width: 1180px) {
|
||||
.terminal-grid {
|
||||
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
||||
grid-template-areas:
|
||||
"display display"
|
||||
"source controls"
|
||||
"summary log";
|
||||
}
|
||||
|
||||
.event-log {
|
||||
max-height: 340px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 760px) {
|
||||
.app-shell {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.title-row {
|
||||
display: grid;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.status-strip {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.terminal-grid {
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-areas:
|
||||
"display"
|
||||
"source"
|
||||
"controls"
|
||||
"summary"
|
||||
"log";
|
||||
}
|
||||
|
||||
.terminal-panel {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.button-row,
|
||||
.auto-grid,
|
||||
.transport-row {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.display-head {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.terminal-screen {
|
||||
min-height: 420px;
|
||||
}
|
||||
|
||||
.table-output {
|
||||
min-width: 760px;
|
||||
padding: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
scroll-behavior: auto !important;
|
||||
transition: none !important;
|
||||
animation: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user