Files
plumber/static/app.css
T
codegirl007 7412069ca6 Add nested posts UI (#5)
## Summary
- Cut hunt, question, submission, voting, hiding, and profile flows over to unified posts
- Render nested replies with permission-aware inline Reply/Edit controls and edited markers
- Add post profile queries and the author index migration they depend on

Co-authored-by: codegirl-007 <s.raide@gmail.com>
2026-08-27 15:53:01 +00:00

902 lines
16 KiB
CSS

:root {
--bg: #161719;
--panel: #1e2023;
--ink: #ecebe7;
--muted: #8d9096;
--line: #2e3136;
--zinc: #6b7078;
--signal: #e96a26;
--signal-ink: #161719;
--err: #e24b4b;
--err-bg: #2a1a1a;
--ok: #e96a26;
--sans: "Archivo", "Helvetica Neue", sans-serif;
--mono: "IBM Plex Mono", ui-monospace, monospace;
--pad: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body {
margin: 0;
padding: 0;
min-height: 100%;
background: var(--bg);
color: var(--ink);
font: 16px/1.45 var(--sans);
-webkit-text-size-adjust: 100%;
color-scheme: dark;
}
body {
background-image:
linear-gradient(180deg, #1a1c1f 0%, var(--bg) 180px),
repeating-linear-gradient(
90deg,
transparent,
transparent 47px,
#1c1e21 47px,
#1c1e21 48px
);
background-size: 100% 100%, 48px 48px;
}
img, svg { display: block; }
a {
color: var(--signal);
text-underline-offset: 0.18em;
}
.skip {
position: absolute;
left: -999px;
}
.skip:focus {
left: 12px;
top: 12px;
z-index: 20;
background: var(--panel);
padding: 8px 12px;
}
.top {
position: sticky;
top: 0;
z-index: 20;
background: #141516;
border-bottom: 1px solid var(--line);
box-shadow: inset 0 2px 0 var(--signal);
}
.top-inner {
width: min(840px, calc(100% - 32px));
margin: 0 auto;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 12px 16px;
padding: calc(12px + env(safe-area-inset-top, 0px)) 0 12px;
}
.logo {
display: flex;
align-items: center;
gap: 12px;
color: var(--signal);
text-decoration: none;
}
.mark {
width: 32px;
height: 32px;
flex: none;
}
.logo-text {
display: flex;
flex-direction: column;
gap: 3px;
}
.logo-name {
font-size: 0.95rem;
font-weight: 600;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--ink);
line-height: 1.15;
}
.tagline {
color: var(--muted);
font-family: var(--mono);
font-size: 0.65rem;
letter-spacing: 0.12em;
text-transform: uppercase;
}
.top-nav {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
}
.who {
color: var(--muted);
font-family: var(--mono);
font-size: 0.75rem;
max-width: 9rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
letter-spacing: 0.04em;
}
.account-menu {
position: relative;
}
.account-menu-toggle {
gap: 8px;
list-style: none;
padding-left: 10px;
border-color: transparent;
}
.account-menu-toggle:hover {
border-color: transparent;
}
.account-menu-toggle::-webkit-details-marker { display: none; }
.account-menu-toggle::marker { content: ""; }
.nav-avatar {
width: 28px;
height: 28px;
border-radius: 50%;
object-fit: cover;
flex: none;
border: 1px solid var(--line);
background: var(--panel);
}
.nav-avatar-ghost {
display: inline-flex;
align-items: center;
justify-content: center;
font-family: var(--mono);
font-size: 0.7rem;
font-weight: 600;
letter-spacing: 0;
text-transform: uppercase;
color: var(--signal);
}
.account-menu-caret {
width: 0;
height: 0;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-top: 5px solid var(--muted);
}
.account-menu[open] .account-menu-caret {
border-top: none;
border-bottom: 5px solid var(--muted);
}
.account-menu-panel {
position: absolute;
right: 0;
top: calc(100% + 6px);
z-index: 10;
min-width: 10.5rem;
padding: 6px;
background: var(--panel);
border: 1px solid var(--line);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.account-menu-item {
display: flex;
align-items: center;
width: 100%;
min-height: 40px;
padding: 0 12px;
border: 0;
border-radius: 2px;
background: transparent;
color: var(--ink);
font: inherit;
font-weight: 600;
font-size: 0.75rem;
letter-spacing: 0.08em;
text-transform: uppercase;
text-decoration: none;
text-align: left;
cursor: pointer;
}
.account-menu-item:hover,
.account-menu-item:focus-visible {
background: #26282c;
outline: none;
}
.logout { margin: 0; }
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 44px;
padding: 0 16px;
border-radius: 3px;
border: 1px solid transparent;
font: inherit;
font-weight: 600;
font-size: 0.8rem;
letter-spacing: 0.08em;
text-transform: uppercase;
text-decoration: none;
cursor: pointer;
touch-action: manipulation;
}
.btn-primary {
background: var(--signal);
color: var(--signal-ink);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost {
background: transparent;
color: var(--ink);
border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--zinc); }
.wrap {
width: min(840px, calc(100% - 32px));
margin: 28px auto 56px;
}
#flash:empty { display: none; }
.banner {
width: min(840px, calc(100% - 32px));
margin: 16px auto 0;
padding: 12px 16px;
background: var(--panel);
border: 1px solid var(--line);
border-left: 3px solid var(--signal);
color: var(--ink);
}
.banner.error {
background: var(--err-bg);
border-left-color: var(--err);
color: #ffd0d0;
}
.hunt-head {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: end;
gap: 20px;
margin-bottom: 8px;
padding-bottom: 20px;
border-bottom: 1px solid var(--line);
}
.eyebrow {
margin: 0;
font-family: var(--mono);
text-transform: uppercase;
letter-spacing: 0.16em;
font-size: 0.68rem;
font-weight: 500;
color: var(--signal);
}
h1 {
margin: 10px 0 0;
font-size: clamp(1.8rem, 4.5vw, 2.75rem);
font-weight: 500;
letter-spacing: -0.03em;
line-height: 1.05;
text-wrap: pretty;
}
.date-nav {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px;
}
.chip {
min-height: 40px;
padding: 8px 12px;
border-radius: 3px;
border: 1px solid var(--line);
background: transparent;
color: var(--ink);
text-decoration: none;
font-family: var(--mono);
font-weight: 500;
font-size: 0.72rem;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.chip.is-on {
background: var(--signal);
border-color: var(--signal);
color: var(--signal-ink);
}
.date-form {
display: flex;
gap: 6px;
align-items: center;
}
.date-form input[type="date"] {
min-height: 44px;
padding: 0 10px;
border: 1px solid var(--line);
border-radius: 3px;
font: inherit;
font-family: var(--mono);
font-size: 0.8rem;
background: var(--panel);
color: var(--ink);
color-scheme: dark;
}
.board {
list-style: none;
margin: 0;
padding: 0;
background: var(--panel);
border: 1px solid var(--line);
}
.row {
display: grid;
grid-template-columns: 2.8rem 3.25rem 1fr;
gap: 4px 8px;
align-items: start;
padding: 14px 12px;
border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row:hover { background: #24262b; }
.rank {
font-family: var(--mono);
font-weight: 500;
font-size: 1.15rem;
line-height: 1;
color: var(--zinc);
text-align: right;
padding-top: 12px;
}
.row:first-child .rank { color: var(--signal); }
.vote {
display: flex;
flex-direction: column;
align-items: center;
gap: 0;
}
.vote form { margin: 0; }
.vote-btn {
width: 44px;
height: 40px;
display: inline-flex;
align-items: center;
justify-content: center;
border: 0;
background: transparent;
color: var(--zinc);
cursor: pointer;
text-decoration: none;
touch-action: manipulation;
border-radius: 3px;
}
.vote-btn:hover { color: var(--ink); background: #2a2d32; }
.vote-btn.is-up { color: var(--signal); }
.vote-btn.is-down { color: var(--muted); }
.score {
font-family: var(--mono);
font-variant-numeric: tabular-nums;
font-weight: 500;
font-size: 0.85rem;
}
.q-title {
color: var(--ink);
font-weight: 500;
text-decoration: none;
font-size: 1.05rem;
text-wrap: pretty;
}
.q-title:hover { color: var(--signal); }
.meta {
margin: 6px 0 0;
color: var(--muted);
font-family: var(--mono);
font-size: 0.72rem;
letter-spacing: 0.02em;
}
.dot { margin: 0 0.35em; }
.badge {
display: inline-block;
margin-left: 8px;
padding: 2px 6px;
border: 1px solid var(--signal);
color: var(--signal);
font-size: 0.62rem;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.empty {
padding: 48px 16px;
text-align: left;
color: var(--muted);
}
.empty-kicker {
font-family: var(--mono);
font-size: 0.72rem;
letter-spacing: 0.16em;
text-transform: uppercase;
color: var(--signal);
margin: 0 0 8px;
}
.inline-hide { margin: 6px 0 0; }
.linkish {
background: none;
border: 0;
padding: 0;
color: var(--muted);
font: inherit;
font-family: var(--mono);
font-size: 0.72rem;
letter-spacing: 0.06em;
text-transform: uppercase;
text-decoration: underline;
cursor: pointer;
min-height: 44px;
}
.lede, .hint, .switch {
color: var(--muted);
}
.lede { margin: 8px 0 0; max-width: 38rem; text-wrap: pretty; }
.ask, .answer-form {
display: flex;
flex-direction: column;
gap: 8px;
margin-top: 20px;
}
label {
font-family: var(--mono);
font-weight: 500;
font-size: 0.68rem;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--muted);
}
input[type="text"],
input[type="password"],
textarea {
width: 100%;
font: inherit;
font-size: 16px;
padding: 12px 12px;
border: 1px solid var(--line);
border-radius: 3px;
background: #141516;
color: var(--ink);
}
input:focus, textarea:focus, .btn:focus-visible, .chip:focus-visible, .vote-btn:focus-visible {
outline: 2px solid var(--signal);
outline-offset: 2px;
}
.optional { font-weight: 400; letter-spacing: 0.04em; }
.panel-wrap, .auth-wrap {
background: var(--panel);
border: 1px solid var(--line);
border-radius: 3px;
padding: 24px 20px 28px;
}
.question-page .q-detail {
display: grid;
grid-template-columns: 3.25rem 1fr;
gap: 8px 14px;
background: var(--panel);
border: 1px solid var(--line);
padding: 18px 14px;
}
.post-content { min-width: 0; }
.question-page h1 {
font-size: clamp(1.5rem, 3.5vw, 2.1rem);
line-height: 1.15;
}
.post-body {
white-space: pre-wrap;
margin: 14px 0 0;
text-wrap: pretty;
}
.crumb { margin: 0 0 20px; }
.crumb a {
color: var(--muted);
text-decoration: none;
font-family: var(--mono);
font-size: 0.72rem;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.crumb a:hover { color: var(--signal); }
.post-kicker {
margin: 0 0 6px;
font-family: var(--mono);
text-transform: uppercase;
letter-spacing: 0.16em;
font-size: 0.68rem;
font-weight: 500;
color: var(--signal);
}
.conversation {
margin-top: 32px;
}
.conversation-head {
margin-bottom: 12px;
padding-bottom: 12px;
border-bottom: 1px solid var(--line);
}
.conversation h2 {
margin: 0;
font-size: 1.25rem;
font-weight: 500;
}
.conversation-head .eyebrow {
margin-bottom: 5px;
}
.thread {
display: grid;
gap: 12px;
}
.thread-post {
position: relative;
padding: 16px;
background: var(--panel);
border: 1px solid var(--line);
border-left: 2px solid var(--zinc);
overflow-wrap: anywhere;
}
.thread-post.is-shop {
border-left-color: var(--signal);
}
.thread-post:target,
.q-detail:target {
outline: 2px solid var(--signal);
outline-offset: 3px;
}
.thread-post-branch,
.thread-post-deep {
margin-left: clamp(12px, 4vw, 28px);
}
.thread-post-deep .thread-post-deep {
margin-left: 0;
}
.post-replies {
display: grid;
gap: 12px;
margin-top: 12px;
}
.post-meta {
margin: 6px 0 0;
color: var(--muted);
font-family: var(--mono);
font-size: 0.72rem;
}
.edited {
display: inline-block;
margin-left: 8px;
color: var(--zinc);
font-size: 0.65rem;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.post-actions {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
gap: 0 16px;
margin-top: 10px;
border-top: 1px solid var(--line);
}
.post-composer {
min-width: 0;
}
.post-composer[open] {
flex: 1 0 100%;
}
.post-composer summary {
display: flex;
width: fit-content;
min-height: 44px;
align-items: center;
color: var(--muted);
font-family: var(--mono);
font-size: 0.72rem;
letter-spacing: 0.06em;
text-transform: uppercase;
text-decoration: underline;
cursor: pointer;
list-style: none;
}
.post-composer summary::-webkit-details-marker { display: none; }
.post-composer summary::marker { content: ""; }
.post-composer summary:hover,
.post-composer[open] summary { color: var(--signal); }
.post-composer summary:focus-visible {
outline: 2px solid var(--signal);
outline-offset: 2px;
}
.post-form {
display: flex;
flex-direction: column;
gap: 8px;
width: 100%;
margin: 0 0 14px;
}
.post-form-actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.post-form-actions .btn { flex: 1 1 10rem; }
.post-hide {
margin: 0;
}
.waiting { color: var(--muted); margin: 0; font-family: var(--mono); font-size: 0.8rem; }
.auth-wrap {
width: min(420px, calc(100% - 32px));
}
.auth-wrap h1 { font-size: 1.7rem; }
.site-footer {
width: min(840px, calc(100% - 32px));
margin: 0 auto;
padding: 20px 0 calc(36px + var(--pad));
color: var(--muted);
font-family: var(--mono);
font-size: 0.72rem;
line-height: 1.55;
border-top: 1px solid var(--line);
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
@media (min-width: 640px) {
.row {
grid-template-columns: 3.4rem 3.5rem 1fr;
padding: 16px 18px;
}
.rank { font-size: 1.35rem; }
.panel-wrap { padding: 32px; }
}
@media (prefers-reduced-motion: reduce) {
.btn-primary:hover { filter: none; }
}
.admin-users { margin-top: 20px; overflow-x: auto; }
.user-table {
width: 100%;
border-collapse: collapse;
font-size: 0.95rem;
}
.user-table th,
.user-table td {
text-align: left;
padding: 12px 10px;
border-bottom: 1px solid var(--line);
vertical-align: middle;
}
.user-table th {
color: var(--muted);
font-family: var(--mono);
font-size: 0.7rem;
font-weight: 500;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.user-table .mono {
font-family: var(--mono);
font-size: 0.85rem;
}
.user-actions form { margin: 0; display: inline; }
.user-actions .btn {
min-height: 36px;
padding: 0 12px;
font-size: 0.7rem;
}
.profile-page h2 {
margin: 40px 0 16px;
font-size: 1.15rem;
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.profile-form {
display: flex;
flex-direction: column;
gap: 10px;
max-width: 28rem;
margin-top: 24px;
}
.profile-avatar {
display: flex;
align-items: center;
gap: 16px;
margin-bottom: 8px;
}
.avatar {
width: 96px;
height: 96px;
border-radius: 50%;
object-fit: cover;
border: 1px solid var(--line);
background: var(--panel);
}
.avatar-empty {
display: flex;
align-items: center;
justify-content: center;
font-family: var(--mono);
font-size: 1.6rem;
font-weight: 600;
color: var(--signal);
text-transform: uppercase;
}
.avatar-fields label { margin-bottom: 6px; display: block; }
.hint, .muted {
margin: 0;
color: var(--muted);
font-family: var(--mono);
font-size: 0.72rem;
line-height: 1.45;
}
.profile-form select,
.profile-form input[type="file"] {
width: 100%;
min-height: 44px;
padding: 8px 12px;
border: 1px solid var(--line);
border-radius: 3px;
background: var(--panel);
color: var(--ink);
font: inherit;
}
.profile-form .btn { align-self: flex-start; margin-top: 8px; }
.profile-q-list {
list-style: none;
margin: 0;
padding: 0;
border-top: 1px solid var(--line);
}
.profile-q-list li {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: 8px 16px;
padding: 14px 0;
border-bottom: 1px solid var(--line);
}
.profile-q-list a {
color: var(--ink);
text-decoration: none;
font-weight: 500;
}
.profile-q-list a:hover { color: var(--signal); }
.profile-q-list .meta {
color: var(--muted);
font-family: var(--mono);
font-size: 0.72rem;
}