7d3140334e
- conversations: dm (unique pair, find-or-create), group (titled), project (customer-bound); participant-only access - messages: server-sanitized rich text, attachments referencing uploads from the generic POST /api/v1/files endpoint (rate limited, MIME sniffed) - unread counts via aggregation; mark-read pushes readBy receipts - chat files served only to conversation participants (or uploader) - @mentions in chat notify the mentioned participant - typing indicator: client WS event relayed to other participants - WS targeted delivery (SendTo) + 15s polling fallback - two-pane messages UI: conversation list with unread badges, composer (contenteditable + formatting buttons), drag & drop upload, inline image previews with lightbox, new-conversation dialog with user search Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
257 lines
9.3 KiB
CSS
257 lines
9.3 KiB
CSS
/* Bounty Board — hand-written CSS, no framework (§2.2).
|
|
Theming via CSS custom properties on <html data-theme>. */
|
|
|
|
:root[data-theme=light] {
|
|
--bg:#f3ead9; --surface:#faf5ea; --surface2:#efe5d0; --border:#d8cbb0;
|
|
--text:#2b2620; --muted:#6f6353; --accent:#8a5a2b; --accent-contrast:#fff;
|
|
--ok:#3c6e47; --warn:#a06a1f; --err:#9c3a2e; --radius:2px;
|
|
}
|
|
:root[data-theme=dark] {
|
|
--bg:#191714; --surface:#221f1b; --surface2:#2b2722; --border:#3a342c;
|
|
--text:#ece5d8; --muted:#a59a87; --accent:#caa15e; --accent-contrast:#1a160f;
|
|
--ok:#7fb78a; --warn:#d9a44a; --err:#d97b6c; --radius:2px;
|
|
}
|
|
|
|
/* ---- base ---- */
|
|
* { box-sizing: border-box; }
|
|
html { font-size: 16px; }
|
|
body {
|
|
margin: 0;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
line-height: 1.5;
|
|
}
|
|
a { color: var(--accent); text-decoration: none; }
|
|
a:hover { text-decoration: underline; }
|
|
h1, h2, h3 { line-height: 1.25; margin: 0 0 16px; }
|
|
h1 { font-size: 1.5rem; }
|
|
h2 { font-size: 1.2rem; }
|
|
h3 { font-size: 1rem; }
|
|
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
|
|
|
|
:focus-visible {
|
|
outline: 2px solid var(--accent);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* ---- layout ---- */
|
|
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }
|
|
.narrow { max-width: 460px; }
|
|
|
|
.topnav {
|
|
display: flex; align-items: center; gap: 16px;
|
|
background: var(--surface);
|
|
border-bottom: 1px solid var(--border);
|
|
padding: 8px 16px;
|
|
}
|
|
.topnav .brand { font-weight: 700; color: var(--text); }
|
|
.topnav .links { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
|
|
.topnav .links a {
|
|
color: var(--muted); padding: 6px 10px; border-radius: var(--radius);
|
|
}
|
|
.topnav .links a:hover { color: var(--text); background: var(--surface2); text-decoration: none; }
|
|
.topnav .links a[aria-current=page] { color: var(--text); background: var(--surface2); }
|
|
.topnav .right { display: flex; align-items: center; gap: 8px; }
|
|
|
|
/* ---- components ---- */
|
|
.card {
|
|
background: var(--surface);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 24px;
|
|
}
|
|
.card + .card { margin-top: 16px; }
|
|
|
|
.btn {
|
|
display: inline-flex; align-items: center; gap: 8px;
|
|
font: inherit; cursor: pointer;
|
|
padding: 8px 16px;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
background: var(--surface2);
|
|
color: var(--text);
|
|
}
|
|
.btn:hover { filter: brightness(0.97); }
|
|
.btn.primary {
|
|
background: var(--accent); color: var(--accent-contrast); border-color: var(--accent);
|
|
}
|
|
.btn.danger { background: var(--err); color: #fff; border-color: var(--err); }
|
|
.btn.ghost { background: transparent; }
|
|
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
.btn.small { padding: 4px 8px; font-size: 0.875rem; }
|
|
|
|
label { display: block; font-weight: 600; margin-bottom: 4px; }
|
|
.hint { color: var(--muted); font-size: 0.875rem; margin: 4px 0 0; }
|
|
input[type=text], input[type=email], input[type=password], input[type=number],
|
|
select, textarea {
|
|
width: 100%;
|
|
font: inherit; color: var(--text);
|
|
background: var(--bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 8px;
|
|
}
|
|
textarea { resize: vertical; min-height: 80px; }
|
|
.field { margin-bottom: 16px; }
|
|
.row { display: flex; gap: 16px; }
|
|
.row > * { flex: 1; }
|
|
|
|
.error-box, .ok-box {
|
|
border: 1px solid var(--err); color: var(--err);
|
|
border-radius: var(--radius);
|
|
padding: 8px 12px; margin-bottom: 16px;
|
|
}
|
|
.ok-box { border-color: var(--ok); color: var(--ok); }
|
|
.error-box:empty, .ok-box:empty { display: none; }
|
|
|
|
.badge {
|
|
display: inline-block; font-size: 0.75rem; font-weight: 600;
|
|
padding: 2px 8px; border-radius: var(--radius);
|
|
background: var(--surface2); color: var(--muted);
|
|
border: 1px solid var(--border);
|
|
}
|
|
.badge.accent { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
|
|
|
|
.avatar {
|
|
width: 32px; height: 32px; border-radius: var(--radius);
|
|
background: var(--accent); color: var(--accent-contrast);
|
|
display: inline-flex; align-items: center; justify-content: center;
|
|
font-weight: 700; font-size: 0.875rem;
|
|
object-fit: cover; overflow: hidden;
|
|
}
|
|
.avatar.large { width: 96px; height: 96px; font-size: 2rem; }
|
|
img.avatar { background: var(--surface2); }
|
|
|
|
table.list { width: 100%; border-collapse: collapse; }
|
|
table.list th, table.list td {
|
|
text-align: left; padding: 8px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
table.list th { color: var(--muted); font-size: 0.875rem; }
|
|
|
|
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
|
|
|
|
.muted { color: var(--muted); }
|
|
.spread { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
|
|
.stack > * + * { margin-top: 16px; }
|
|
.mt { margin-top: 16px; }
|
|
|
|
.kv-row { display: flex; gap: 8px; margin-bottom: 8px; }
|
|
.kv-row input { flex: 1; }
|
|
|
|
/* toast notifications */
|
|
#toasts {
|
|
position: fixed; bottom: 16px; right: 16px; z-index: 100;
|
|
display: flex; flex-direction: column; gap: 8px; max-width: 360px;
|
|
}
|
|
.toast {
|
|
background: var(--surface); border: 1px solid var(--border);
|
|
border-left: 3px solid var(--accent);
|
|
border-radius: var(--radius);
|
|
padding: 12px 16px;
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
|
|
}
|
|
.toast.err { border-left-color: var(--err); }
|
|
.toast.ok { border-left-color: var(--ok); }
|
|
|
|
/* chat */
|
|
.chat-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; min-height: 70vh; }
|
|
.chat-sidebar { overflow: auto; }
|
|
.conv-list { list-style: none; margin: 8px 0 0; padding: 0; }
|
|
.conv-list li { border-bottom: 1px solid var(--border); }
|
|
.conv-list li.active .conv-item { background: var(--surface2); }
|
|
.conv-item {
|
|
display: flex; justify-content: space-between; align-items: center; gap: 8px;
|
|
width: 100%; padding: 10px 8px; font: inherit; text-align: left;
|
|
background: none; border: none; color: var(--text); cursor: pointer;
|
|
border-radius: var(--radius);
|
|
}
|
|
.conv-item:hover { background: var(--surface2); }
|
|
.chat-main { display: flex; flex-direction: column; }
|
|
.chat-messages { flex: 1; overflow: auto; padding: 8px 0; min-height: 320px; }
|
|
.chat-msg {
|
|
max-width: 75%; margin: 8px 0; padding: 8px 12px;
|
|
background: var(--surface2); border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
}
|
|
.chat-msg.own { margin-left: auto; background: color-mix(in srgb, var(--accent) 12%, var(--surface2)); }
|
|
.chat-msg p, .chat-msg ul, .chat-msg ol { margin: 4px 0; }
|
|
.chat-img { max-width: 240px; max-height: 180px; cursor: zoom-in; border-radius: var(--radius); }
|
|
.chat-toolbar { display: flex; gap: 4px; margin-bottom: 8px; }
|
|
.chat-composer {
|
|
min-height: 60px; max-height: 200px; overflow: auto;
|
|
background: var(--bg); border: 1px solid var(--border);
|
|
border-radius: var(--radius); padding: 8px;
|
|
}
|
|
.chat-composer:empty::before { content: attr(data-placeholder); color: var(--muted); }
|
|
.chat-attachments { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
|
|
.lightbox { border: none; background: transparent; max-width: 92vw; max-height: 92vh; }
|
|
.lightbox img { max-width: 90vw; max-height: 88vh; cursor: zoom-out; }
|
|
.lightbox::backdrop { background: rgba(0,0,0,0.8); }
|
|
@media (max-width: 800px) { .chat-layout { grid-template-columns: 1fr; } }
|
|
|
|
/* kanban */
|
|
.kanban { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
|
|
.kanban-col {
|
|
background: var(--surface2); border: 1px solid var(--border);
|
|
border-radius: var(--radius); padding: 16px; min-height: 200px;
|
|
}
|
|
.kanban-col h2 { font-size: 0.9rem; text-transform: uppercase; color: var(--muted); }
|
|
|
|
/* notification bell */
|
|
.bell-badge {
|
|
position: absolute; top: -4px; right: -4px;
|
|
background: var(--err); color: #fff;
|
|
font-size: 0.65rem; font-weight: 700;
|
|
padding: 1px 5px; border-radius: var(--radius);
|
|
}
|
|
.notif-panel {
|
|
position: absolute; right: 0; top: 36px; z-index: 50;
|
|
width: 320px; max-height: 420px; overflow: auto;
|
|
background: var(--surface); border: 1px solid var(--border);
|
|
border-radius: var(--radius); padding: 12px;
|
|
box-shadow: 0 4px 16px rgba(0,0,0,0.2);
|
|
}
|
|
.notif-list { list-style: none; margin: 0 0 8px; padding: 0; }
|
|
.notif-list li { padding: 8px 0; border-bottom: 1px solid var(--border); }
|
|
.notif-list a { color: var(--text); text-decoration: none; }
|
|
.notif-list a:hover { text-decoration: none; opacity: 0.85; }
|
|
|
|
/* atomizing progress shimmer */
|
|
.shimmer {
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
.shimmer::after {
|
|
content: "";
|
|
position: absolute; inset: 0;
|
|
background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 12%, transparent), transparent);
|
|
animation: shimmer 1.6s infinite;
|
|
}
|
|
@keyframes shimmer {
|
|
from { transform: translateX(-100%); }
|
|
to { transform: translateX(100%); }
|
|
}
|
|
input[type=range] { width: 100%; accent-color: var(--accent); }
|
|
|
|
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
|
|
.tabs [aria-selected=true] { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
|
|
|
|
dialog {
|
|
background: var(--surface); color: var(--text);
|
|
border: 1px solid var(--border); border-radius: var(--radius);
|
|
padding: 24px; max-width: 90vw; max-height: 90vh; overflow: auto;
|
|
}
|
|
dialog::backdrop { background: rgba(0,0,0,0.4); }
|
|
fieldset {
|
|
border: 1px solid var(--border); border-radius: var(--radius);
|
|
margin: 0 0 16px; padding: 16px;
|
|
}
|
|
legend { font-weight: 600; padding: 0 8px; }
|
|
|
|
@media (max-width: 640px) {
|
|
.row { flex-direction: column; gap: 0; }
|
|
.topnav { flex-wrap: wrap; }
|
|
}
|