Files
jobboard/app/static/app.css
T
WolfandClaude Fable 5.1 55248555e9 Companies and Searches: follow, hide not mute, prune moved, one row style
Companies gets a Follow-a-company form, a combined affinity/on-off filter,
and one .srow-style row per company (name, board or "from searches", open
roles, on/off switch, affinity). The prune-by-region tool moves here from
Searches, folded under the list in a <details>. The lede states the
difference between switching a board off (stops reading it, closes its
roles) and hiding a company (keeps reading it, keeps its roles out of the
list and unscored).

affinityControl becomes three icon toggles (favourite, like, hidden) instead
of four letter buttons with a neutral one; pressing the pressed icon clears
back to neutral. "Hidden" is the word everywhere the UI names affinity -1;
the code keeps mute/hide_muted. CompanyOut carries each company's board
subscription id and on-state, so the Companies page needs only
/api/companies, not a second fetch of /api/sources. Setting a company's
affinity now enqueues a score job, deduped by the queue to one run.

Searches keeps only the search form and list, in the same row style;
company boards and the prune tool left with it, and "Pull now" left for
Pulls (package B3).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-25 22:02:28 +02:00

560 lines
20 KiB
CSS

/* The whole stylesheet: the boilerplate's, with roledesk's palette in the
* custom properties (a quiet UI face and newsdesk's teal signal colour), the
* frame (a top bar of two tabs and a cog, the settings sub-tabs), roledesk's
* own pages, and at the bottom the phone: a width query for the layout and a
* pointer query for the sizes, after newsdesk and health. No build step.
*
* The `--desk-jobs-*` block is how `<desk-jobs>`, `<desk-schedules>` and
* `<auth-account>` are themed. Each keeps to a shadow root and reads those
* properties, so an app skins it without forking it -- which is the deal
* that lets the queue ship its own UI and still look like it belongs here --
* and the app cannot lay it out beyond that.
*/
:root {
color-scheme: light dark;
--bg: #eceff1;
--panel: #ffffff;
--fg: #1a2027;
--dim: #505c67;
--line: #d6dbdf;
--accent: #14655b;
--accent-fg: #ffffff;
--good: #15803d;
--warn: #b45309;
--error: #b91c1c;
--radius: 10px;
--gap: 1rem;
--font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto,
"Helvetica Neue", Arial, sans-serif;
--mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #14181c;
--panel: #1b2126;
--fg: #e3e7ea;
--dim: #a8b2ba;
--line: #2a3238;
--accent: #4fb3a3;
--accent-fg: #14181c;
--good: #4ade80;
--warn: #fbbf24;
--error: #f87171;
}
}
* { box-sizing: border-box; }
/* `hidden` has to win over any class that sets `display`, such as `.check`. */
[hidden] { display: none !important; }
body {
margin: 0;
background: var(--bg);
color: var(--fg);
font: 16px/1.55 var(--font);
}
code, pre { font-family: var(--mono); font-size: 0.9em; }
pre { overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
a { color: var(--accent); }
/* -- the frame ------------------------------------------------------------ */
.top {
display: flex;
align-items: center;
gap: var(--gap);
flex-wrap: wrap;
padding: 0.75rem 1.25rem;
/* Standalone on a phone with a notch: the bar clears the status area. */
padding-top: calc(0.75rem + env(safe-area-inset-top));
background: var(--panel);
border-bottom: 1px solid var(--line);
position: sticky;
top: 0;
z-index: 5;
}
.brand span { color: var(--accent); }
.brand {
font-weight: 700;
letter-spacing: 0.02em;
text-decoration: none;
color: var(--fg);
}
.top nav { display: flex; gap: 0.25rem; flex-wrap: wrap; align-items: center; }
.top nav a {
padding: 0.35rem 0.7rem;
border-radius: var(--radius);
text-decoration: none;
color: var(--dim);
}
/* The cog: an SVG, centred in a box the height of a word. */
.top nav a.icon { display: inline-flex; align-items: center; padding-block: 0.45rem; }
/* Hover needs a pointer to hover with, and a phone has none: it fakes one on
the element last touched and leaves it there, so a tapped tab would keep a
tint it has no reason to have (newsdesk's app.css says the same). Every
`:hover` in this file is inside one of these. */
@media (hover: hover) {
.top nav a:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
}
.top nav a.active { background: var(--accent); color: var(--accent-fg); }
/* The settings sub-tabs, health's: an underlined row here, pills on a phone. */
.subtabs {
display: flex; gap: 4px; margin: 4px 0 14px;
border-bottom: 1px solid var(--line);
}
.subtabs a {
padding: 7px 12px;
color: var(--dim);
font-weight: 500;
text-decoration: none;
border-bottom: 2px solid transparent;
margin-bottom: -1px;
}
@media (hover: hover) {
.subtabs a:hover { color: var(--fg); }
}
.subtabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
main {
max-width: 62rem;
margin: 0 auto;
padding: 1.5rem 1.25rem 4rem;
padding-bottom: calc(4rem + env(safe-area-inset-bottom));
}
h1 { font-size: 1.6rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.1rem; margin: 0 0 0.75rem; }
.lede { color: var(--dim); max-width: 46rem; }
.muted { color: var(--dim); }
.small { font-size: 0.85rem; }
.note {
background: color-mix(in srgb, var(--accent) 8%, var(--panel));
border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
border-radius: var(--radius);
padding: 0.9rem 1rem;
max-width: 46rem;
}
.card {
background: var(--panel);
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 1rem 1.15rem;
margin: 1.25rem 0;
}
.row-between {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: var(--gap);
}
.summary { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1rem; margin: 0; }
.summary dt { color: var(--dim); }
.summary dd { margin: 0; }
.buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
button {
font: inherit;
padding: 0.4rem 0.9rem;
border-radius: var(--radius);
border: 1px solid transparent;
background: var(--accent);
color: var(--accent-fg);
cursor: pointer;
}
button:disabled { opacity: 0.55; cursor: progress; }
button.secondary {
background: transparent;
color: var(--fg);
border-color: var(--line);
}
.badge {
display: inline-block;
padding: 0 0.4rem;
border-radius: 999px;
background: var(--line);
color: var(--dim);
font-size: 0.8rem;
}
/* -- the notice log ------------------------------------------------------- */
.notice {
border: 1px solid var(--line);
border-left: 3px solid var(--dim);
border-radius: var(--radius);
padding: 0.6rem 0.8rem;
margin: 0.5rem 0;
}
.notice.error { border-left-color: var(--error); }
.notice.warning { border-left-color: var(--warn); }
.notice.good { border-left-color: var(--good); }
.notice-head { display: flex; justify-content: space-between; gap: var(--gap); align-items: start; }
.notice-text { font-weight: 600; }
/* -- toasts --------------------------------------------------------------- */
.toasts {
position: fixed;
right: 1rem;
bottom: 1rem;
width: min(26rem, calc(100vw - 2rem));
display: flex;
flex-direction: column;
gap: 0.5rem;
/* A popover brings its own box; this is a container, not a card. */
border: 0;
background: transparent;
padding: 0;
margin: 0;
inset: auto 1rem 1rem auto;
}
.toast {
display: flex;
gap: 0.5rem;
align-items: start;
background: var(--panel);
color: var(--fg);
border: 1px solid var(--line);
border-left: 3px solid var(--dim);
border-radius: var(--radius);
padding: 0.6rem 0.75rem;
box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
animation: toast-in 160ms ease-out;
}
.toast.error { border-left-color: var(--error); }
.toast.warning { border-left-color: var(--warn); }
.toast.good { border-left-color: var(--good); }
.toast.out { opacity: 0; transition: opacity 180ms ease-in; }
.toast-body { flex: 1; min-width: 0; }
.toast-count { color: var(--dim); }
.toast-fix { color: var(--dim); }
.toast-actions { display: flex; gap: 0.5rem; align-items: center; }
.toast-actions:empty { display: none; }
.toast-close {
background: transparent;
color: var(--dim);
border: 0;
padding: 0 0.25rem;
line-height: 1;
}
@keyframes toast-in {
from { transform: translateY(6px); opacity: 0; }
to { transform: none; opacity: 1; }
}
/* -- the modules' elements ------------------------------------------------ */
/* `<desk-jobs>` and `<desk-schedules>` from the queue, `<auth-account>` from
* auth: all three read these, so they look like one application and none of
* them is forked to get it. An element the app has not got yet simply matches
* nothing. */
desk-jobs, desk-schedules, auth-account {
display: block;
--desk-jobs-bg: var(--panel);
--desk-jobs-fg: var(--fg);
--desk-jobs-dim: var(--dim);
--desk-jobs-accent: var(--accent);
--desk-jobs-error: var(--error);
--desk-jobs-font: var(--font);
--desk-jobs-gap: var(--gap);
--desk-jobs-radius: var(--radius);
}
/* The schedule table has no narrow layout of its own yet, and what overflows
a shadow root widens the page. It scrolls inside its own box instead. */
desk-schedules { overflow-x: auto; }
/* -- roledesk's tabs ------------------------------------------------------ */
/* Roles, Applications, Agents and Companies, drawn by static/roles.js. */
input, select, textarea { font: inherit; color: inherit; min-width: 0; max-width: 100%; }
.filters {
display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
padding: .75rem; margin-bottom: .5rem;
background: var(--panel);
border: 1px solid var(--line); border-radius: var(--radius);
}
.filters input[type="search"], .filters input[type="text"], .filters select {
padding: .4rem .55rem;
border: 1px solid var(--line); border-radius: .3rem;
background: var(--bg); min-width: 0;
}
.filters input[type="search"] { flex: 1 1 12rem; }
.filters input[type="text"] { flex: 1 1 8rem; }
.check {
display: flex; align-items: center; gap: .35rem;
color: var(--dim); font-size: .9rem; white-space: nowrap;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible {
outline: 2px solid var(--accent); outline-offset: 1px;
}
.count { color: var(--dim); font-size: .85rem; margin: .75rem 0 .5rem; }
/* roles */
.roles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.role {
background: var(--panel); border: 1px solid var(--line); border-radius: .5rem;
padding: .6rem .8rem;
display: flex; flex-direction: column; gap: .35rem;
}
.role-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.role-title { font-weight: 600; text-decoration: none; }
@media (hover: hover) {
.role-title:hover { text-decoration: underline; }
}
.role-company { color: var(--dim); }
.role-meta {
display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
color: var(--dim); font-size: .85rem;
}
.role-meta .badge {
background: transparent; color: var(--dim);
border: 1px solid var(--line); border-radius: 1rem;
padding: .05rem .55rem; font-size: .78rem;
}
.role-meta .badge:empty { display: none; }
.role-meta .role-score {
color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
font-variant-numeric: tabular-nums;
}
.role-gated { color: var(--error); font-size: .85rem; }
.role-age { margin-left: auto; }
.role.muted, tr.muted { opacity: .55; }
.role.gated { opacity: .7; }
.affinity { display: inline-flex; gap: .15rem; }
.role-main .affinity { margin-left: auto; }
.affinity button {
background: none; border: 1px solid var(--line); border-radius: .3rem;
padding: .1rem .4rem; color: var(--dim); font-size: 1rem; line-height: 1.4;
}
/* One colour per stance, filled rather than tinted so "pressed" reads at a
glance (news's own reasoning for its vote buttons, app.css 1906-1930):
gold for favourite, the app's own accent for like, the error red for
hidden, since hiding a company is the one stance that keeps its roles out
of the list entirely. */
.affinity button[data-value="2"][aria-pressed="true"] {
color: var(--accent-fg); background: var(--warn); border-color: var(--warn);
}
.affinity button[data-value="1"][aria-pressed="true"] {
color: var(--accent-fg); background: var(--accent); border-color: var(--accent);
}
.affinity button[data-value="-1"][aria-pressed="true"] {
color: var(--accent-fg); background: var(--error); border-color: var(--error);
}
.save { align-self: flex-start; padding: .3rem .8rem; font-weight: 600; }
.save[disabled] {
background: var(--bg); color: var(--dim); border-color: var(--line); cursor: default;
}
/* agents */
.agents { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.agent {
display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
padding: .5rem .75rem;
}
.agent a { font-weight: 600; text-decoration: none; }
.agent-meta { color: var(--dim); font-size: .85rem; flex: 1 1 12rem; }
.agent-form {
display: flex; flex-direction: column; gap: .6rem; max-width: 44rem;
background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
padding: .75rem 1rem;
}
.agent-form h2 { font-size: 1rem; margin: 0; }
.agent-form label { display: flex; flex-direction: column; gap: .2rem; font-size: .9rem; }
.agent-form label.inline { flex-direction: row; align-items: center; gap: .4rem; }
.agent-form input[type="text"], .agent-form textarea, .agent-form input[type="number"] {
background: var(--bg); border: 1px solid var(--line);
border-radius: .3rem; padding: .35rem .5rem; width: 100%;
}
/* Prose in a textarea is read in the page face; JSON is in the mono one. */
.agent-form textarea.code { font-family: var(--mono); font-size: .85rem; }
.agent-form .hint { color: var(--dim); font-size: .8rem; overflow-wrap: anywhere; }
.weights { display: flex; gap: .75rem; flex-wrap: wrap; border: 1px solid var(--line); border-radius: .3rem; }
/* A label that wraps to two lines pushes its box down; the boxes stay in line. */
.weights label { flex: 1 1 6rem; justify-content: space-between; }
.agent-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.agent-form details summary { cursor: pointer; color: var(--dim); font-size: .9rem; }
.agent-form details[open] summary { margin-bottom: .5rem; }
/* ================================================================ */
/* companies and sources — Settings' Companies and Searches pages, */
/* static/companies.js and static/sources.js. Package B2's own */
/* section; the rest of the file is not reflowed for it. */
/* ================================================================ */
.section { margin: 1.5rem 0 2rem; }
.section > h2 { margin-bottom: .25rem; }
.source-form { margin-top: 1rem; max-width: none; }
/* `auto-fit` rather than a fixed count of columns: a row with fewer fields
(Jobindex's Area, say, where Adzuna also needs Country and Place) simply
leaves the boxes it does have at the same width instead of stretching one
to fill the gap, which is what made the boxes disagree with each other's
width before. */
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; align-items: start; }
.source-form select {
background: var(--bg); border: 1px solid var(--line);
border-radius: .3rem; padding: .35rem .5rem;
}
.source-form input[type="number"] { max-width: 6rem; }
.sample { margin: 0; padding-left: 1.25rem; font-size: .9rem; }
.sample li { margin: .15rem 0; }
.mono { font-family: var(--mono); overflow-wrap: anywhere; }
/* A row of a list that is not a table: Companies and Searches, after news's
`.srow` (app.css 659-665 and 783-787 there). Line one is the name and
whatever switch or controls belong beside it; `.sub`, muted and full width,
wraps onto its own line rather than sharing a column with them, which is
what keeps a long query or board name from crowding the switch at any
width — a table's fixed columns needed a breakpoint to do the same, a grid
with one column spanning the row does not. */
.srows, .crows { display: flex; flex-direction: column; margin: .5rem 0 1.5rem; }
.srow, .crow {
display: grid; grid-template-columns: 1fr auto auto;
align-items: center; column-gap: .6rem; row-gap: .15rem;
padding: .5rem 0; border-bottom: 1px solid var(--line);
}
.srow .name, .crow .name {
grid-column: 1; display: flex; align-items: center; gap: .4rem;
font-size: .96rem; text-decoration: none; color: inherit;
}
.crow .name { font-weight: 600; }
@media (hover: hover) {
.crow .name:hover { text-decoration: underline; }
}
.srow .sub, .crow .sub {
grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center;
gap: .4rem; font-size: .8rem; color: var(--dim);
}
.srow[data-muted="true"], .crow[data-hidden="true"] { opacity: .6; }
.linky {
padding: 0; border: 0; background: none; font-size: .8rem;
color: var(--dim); text-decoration: underline; text-underline-offset: 2px;
}
@media (hover: hover) {
.linky:hover { color: var(--fg); background: none; }
}
/* The prune tool: folded under the list, since switching a board off by
region is an occasional errand and not what the page is for. */
.prune > summary { cursor: pointer; color: var(--dim); font-weight: 600; }
.prune[open] > summary { margin-bottom: .75rem; }
/* applications and companies */
table.list { width: 100%; border-collapse: collapse; background: var(--panel); }
table.list th, table.list td {
text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line);
font-size: .9rem;
}
table.list .num { text-align: right; font-variant-numeric: tabular-nums; }
table.list select { padding: .25rem .4rem; }
/* Below tablet width a table stops being a table: each row becomes a card,
its cells stacked, so nothing scrolls sideways to be read. */
@media (max-width: 640px) {
table.list thead { display: none; }
table.list, table.list tbody, table.list tr, table.list td { display: block; width: 100%; }
table.list tr { margin-bottom: .6rem; border: 1px solid var(--line); border-radius: .4rem; }
table.list td { border-bottom: none; }
table.list .num { text-align: left; }
table.list td::before {
content: attr(data-label);
display: block; font-size: .72rem; color: var(--dim); margin-bottom: .1rem;
}
}
@media (max-width: 480px) {
.role-age, .role-main .affinity { margin-left: 0; }
}
/* -- the phone ------------------------------------------------------------ */
/* Two axes, and deliberately not the same one, as in newsdesk: width decides
the layout, pointer decides the sizes. A tablet is wide and touched, a
half-screen laptop window is narrow and moused, and sizing either by width
puts it in the other's clothes. */
@media (max-width: 640px) {
main { padding: 10px 10px calc(3rem + env(safe-area-inset-bottom)); }
h1 { font-size: 1.25rem; }
/* The bar stays one row: the brand keeps its word, the two tabs share what
is left, and the cog keeps its own width rather than a share. */
.top { flex-wrap: nowrap; gap: .5rem; padding: calc(4px + env(safe-area-inset-top)) .6rem 4px; }
.top nav { flex: 1; flex-wrap: nowrap; gap: .15rem; min-width: 0; }
.top nav a { flex: 1 1 auto; text-align: center; padding: .6rem .4rem; white-space: nowrap; }
.top nav a.icon { flex: 0 0 auto; justify-content: center; padding-inline: .7rem; }
/* Six sub-tabs are too many for one row, and a scrolling strip does not
show that more are off the edge. They wrap, three to a row, as pills
rather than the desktop's underlined row. */
.subtabs { flex-wrap: wrap; border-bottom: none; gap: 6px; }
.subtabs a {
flex: 1 1 30%;
padding: 7px 4px;
border-radius: 999px;
border-bottom: none;
margin-bottom: 0;
background: var(--panel);
text-align: center;
font-size: .85rem;
}
.subtabs a.active { background: var(--accent); color: var(--accent-fg); }
/* A panel runs to both edges of the screen: no side margin, border or
rounded corner, so the content keeps all but its own 10 pixels of the
width. The page background between two panels reads as a band. */
.card, .filters, .agent-form, .note {
margin-inline: -10px; border-radius: 0; border-inline: 0;
}
.card { padding: .8rem 10px; }
.row-between { flex-wrap: wrap; }
}
/* The band between two full-width panels needs more contrast than the light
page background gives a white panel; the dark one is already distinct. */
@media (max-width: 640px) and (prefers-color-scheme: light) {
:root { --bg: #e1e5e8; }
}
/* Sizes for a finger. 2.75rem is 44px at the default root size, the smallest
target a thumb hits without aiming. */
@media (pointer: coarse) {
/* Under 16px, iOS Safari zooms the page when a field takes focus, and does
not zoom back out when it loses it. */
input, select, textarea { font-size: 16px; }
button, .top nav a, .subtabs a { min-height: 2.75rem; }
.top nav a, .subtabs a { display: inline-flex; align-items: center; justify-content: center; }
.filters input[type="search"], .filters input[type="text"], .filters select,
.agent-form input, .source-form select { min-height: 2.75rem; }
.affinity button { min-width: 2.75rem; }
.check input { width: 1.25rem; height: 1.25rem; }
}