Files
OCRmyPDF/webui/static/style.css

259 lines
7.0 KiB
CSS

/*
* SPDX-FileCopyrightText: 2026 James R. Barlow
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
:root {
--bg: #f6f7f9;
--surface: #ffffff;
--surface-alt: #f0f2f5;
--border: #d9dee5;
--text: #1a1d21;
--muted: #666e79;
--accent: #2563eb;
--accent-hover: #1d4ed8;
--accent-soft: #e8efff;
--ok: #15803d;
--ok-soft: #e6f5ec;
--warn: #b45309;
--err: #b91c1c;
--err-soft: #fdecec;
--radius: 10px;
--shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #14171a;
--surface: #1c2024;
--surface-alt: #23282e;
--border: #333a42;
--text: #e8eaed;
--muted: #9aa3ad;
--accent: #5b8cff;
--accent-hover: #7ba3ff;
--accent-soft: #1e2a44;
--ok: #4ade80;
--ok-soft: #16281d;
--warn: #fbbf24;
--err: #f87171;
--err-soft: #2c1a1a;
--shadow: none;
}
}
* { box-sizing: border-box; }
body {
margin: 0;
padding: 0 1rem 3rem;
background: var(--bg);
color: var(--text);
font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main, .topbar, footer { max-width: 820px; margin-inline: auto; }
.topbar { padding: 2rem 0 1.25rem; }
.topbar h1 { margin: 0; font-size: 1.6rem; letter-spacing: -.02em; }
.tagline { margin: .3rem 0 0; color: var(--muted); }
h2 { font-size: 1rem; margin: 0; }
footer {
margin-top: 2.5rem;
padding-top: 1rem;
border-top: 1px solid var(--border);
color: var(--muted);
font-size: .82rem;
}
/* ---------------- Dropzone ---------------- */
.dropzone {
border: 2px dashed var(--border);
border-radius: var(--radius);
background: var(--surface);
padding: 2.5rem 1.5rem;
text-align: center;
cursor: pointer;
transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); outline: none; }
.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone-icon {
width: 34px; height: 34px;
stroke: var(--accent); stroke-width: 1.7; fill: none;
stroke-linecap: round; stroke-linejoin: round;
}
.dropzone-title { margin: .6rem 0 .2rem; font-weight: 600; }
.dropzone-hint { margin: 0; color: var(--muted); font-size: .85rem; }
/* ---------------- Panels ---------------- */
#queue-wrap, .options, #results-view {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: var(--shadow);
padding: 1.1rem 1.25rem;
margin-top: 1.25rem;
}
.queue-head {
display: flex; align-items: center; justify-content: space-between;
gap: 1rem; flex-wrap: wrap;
}
.badge {
display: inline-block;
background: var(--surface-alt);
border-radius: 999px;
padding: .05rem .5rem;
font-size: .8rem;
color: var(--muted);
font-weight: 500;
}
/* ---------------- File lists ---------------- */
.file-list { list-style: none; margin: .85rem 0 0; padding: 0; }
.file-row {
display: flex; align-items: center; gap: .75rem;
padding: .6rem .1rem;
border-top: 1px solid var(--border);
}
.file-row:first-child { border-top: none; }
.file-main { flex: 1; min-width: 0; }
.file-name {
font-weight: 500;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-meta { color: var(--muted); font-size: .8rem; }
.file-meta.err { color: var(--err); white-space: normal; }
.pill {
font-size: .74rem; font-weight: 600; text-transform: uppercase;
letter-spacing: .03em;
padding: .16rem .5rem; border-radius: 999px;
background: var(--surface-alt); color: var(--muted);
white-space: nowrap;
}
.pill.running { background: var(--accent-soft); color: var(--accent); }
.pill.succeeded { background: var(--ok-soft); color: var(--ok); }
.pill.failed, .pill.cancelled { background: var(--err-soft); color: var(--err); }
.spinner {
width: 13px; height: 13px; display: inline-block; vertical-align: -2px;
margin-right: .35rem;
border: 2px solid currentColor; border-right-color: transparent;
border-radius: 50%;
animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.5s; } }
/* ---------------- Form ---------------- */
.field { display: block; margin-bottom: 1rem; }
.field-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.field-row > .field { flex: 1 1 240px; }
.label {
display: block; font-weight: 600; font-size: .85rem; margin-bottom: .3rem;
}
.help { color: var(--muted); font-size: .8rem; margin: .3rem 0 0; }
select, input[type="number"] {
width: 100%;
padding: .45rem .55rem;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--surface);
color: var(--text);
font: inherit;
}
select:focus, input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.checkbox-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
gap: .3rem .8rem;
}
.check { display: flex; align-items: center; gap: .4rem; font-size: .9rem; }
.check input { accent-color: var(--accent); }
.advanced { margin: .3rem 0 1rem; }
.advanced summary {
cursor: pointer; font-weight: 600; font-size: .85rem;
padding: .35rem 0; color: var(--accent);
}
.advanced[open] summary { margin-bottom: .75rem; }
.actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.result-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
button { font: inherit; border-radius: 8px; cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
.primary {
background: var(--accent); color: #fff; border: 1px solid var(--accent);
padding: .5rem 1.1rem; font-weight: 600;
}
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.secondary {
background: var(--surface); color: var(--text); border: 1px solid var(--border);
padding: .5rem 1.1rem;
}
.secondary:hover { border-color: var(--accent); }
.link-button {
background: none; border: none; color: var(--accent);
padding: 0; font-size: .85rem; text-decoration: underline;
}
.icon-button {
background: none; border: none; color: var(--muted);
font-size: 1.1rem; line-height: 1; padding: .2rem .4rem;
}
.icon-button:hover { color: var(--err); }
a.download {
color: var(--accent); font-weight: 600; font-size: .85rem;
text-decoration: none; white-space: nowrap;
}
a.download:hover { text-decoration: underline; }
.upload-status { color: var(--muted); font-size: .85rem; }
/* ---------------- Progress + errors ---------------- */
.progress {
height: 5px; margin-top: .85rem;
background: var(--surface-alt); border-radius: 999px; overflow: hidden;
}
.progress-bar {
height: 100%; width: 0;
background: var(--accent);
transition: width .2s ease;
}
.error {
margin-top: 1.25rem; padding: .75rem 1rem;
background: var(--err-soft); border: 1px solid var(--err);
color: var(--err); border-radius: var(--radius);
}
.log {
margin: .5rem 0 0; padding: .6rem .7rem;
background: var(--surface-alt); border-radius: 8px;
font: .78rem/1.45 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
white-space: pre-wrap; word-break: break-word;
max-height: 190px; overflow: auto;
color: var(--muted);
}