Node.js + Express 5 backend with flat NDJSON key-value store (borrowed from electronics-inventory). Sequential integer IDs per namespace. Vanilla JS SPA with filters for status, priority, and tags. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
205 lines
4.1 KiB
CSS
205 lines
4.1 KiB
CSS
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
body {
|
|
font-family: system-ui, sans-serif;
|
|
font-size: 14px;
|
|
background: #1a1a1a;
|
|
color: #e0e0e0;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1.5rem;
|
|
padding: 0.75rem 1.25rem;
|
|
background: #242424;
|
|
border-bottom: 1px solid #333;
|
|
}
|
|
|
|
header h1 {
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
color: #fff;
|
|
}
|
|
|
|
nav { display: flex; gap: 0.5rem; }
|
|
|
|
.nav-btn {
|
|
padding: 0.3rem 0.75rem;
|
|
border: 1px solid #444;
|
|
border-radius: 4px;
|
|
background: transparent;
|
|
color: #aaa;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.nav-btn.active, .nav-btn:hover {
|
|
background: #333;
|
|
color: #fff;
|
|
border-color: #555;
|
|
}
|
|
|
|
main { padding: 1.25rem; }
|
|
|
|
/* Toolbar */
|
|
.toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.toolbar h2 { font-size: 1rem; flex: 1; }
|
|
|
|
/* Filter bar */
|
|
.filter-bar {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
margin-bottom: 0.75rem;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.filter-bar select, .filter-bar input {
|
|
padding: 0.3rem 0.5rem;
|
|
background: #2a2a2a;
|
|
border: 1px solid #444;
|
|
border-radius: 4px;
|
|
color: #e0e0e0;
|
|
font-size: 13px;
|
|
}
|
|
|
|
/* Task list */
|
|
.task-list { display: flex; flex-direction: column; gap: 1px; }
|
|
|
|
.task-row {
|
|
display: grid;
|
|
grid-template-columns: 2.5rem 5rem 4.5rem 1fr auto auto;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
padding: 0.5rem 0.75rem;
|
|
background: #242424;
|
|
border-radius: 4px;
|
|
border-left: 3px solid transparent;
|
|
}
|
|
|
|
.task-row[data-priority='high'] { border-left-color: #e05555; }
|
|
.task-row[data-priority='normal'] { border-left-color: #5588e0; }
|
|
.task-row[data-priority='low'] { border-left-color: #555; }
|
|
|
|
.task-row[data-status='done'] { opacity: 0.5; }
|
|
.task-row[data-status='cancelled'] { opacity: 0.4; text-decoration: line-through; }
|
|
|
|
.task-id { color: #666; font-size: 12px; }
|
|
.task-title { font-weight: 500; }
|
|
|
|
.task-status, .task-priority {
|
|
font-size: 11px;
|
|
padding: 0.15rem 0.4rem;
|
|
border-radius: 3px;
|
|
text-align: center;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.03em;
|
|
}
|
|
|
|
.task-status[data-val='open'] { background: #1e3a5f; color: #6ab0f5; }
|
|
.task-status[data-val='done'] { background: #1a3a1a; color: #6ad06a; }
|
|
.task-status[data-val='cancelled'] { background: #2a1a1a; color: #c06060; }
|
|
.task-status[data-val='deferred'] { background: #2a2a1a; color: #c0b060; }
|
|
|
|
.task-priority[data-val='high'] { background: #3a1a1a; color: #e08080; }
|
|
.task-priority[data-val='normal'] { background: transparent; color: #777; }
|
|
.task-priority[data-val='low'] { background: transparent; color: #555; }
|
|
|
|
.task-tags { display: flex; gap: 0.25rem; flex-wrap: wrap; }
|
|
|
|
.tag {
|
|
font-size: 11px;
|
|
padding: 0.1rem 0.35rem;
|
|
background: #2a2a3a;
|
|
border-radius: 3px;
|
|
color: #8899cc;
|
|
}
|
|
|
|
.task-actions { display: flex; gap: 0.4rem; }
|
|
|
|
/* Buttons */
|
|
button {
|
|
cursor: pointer;
|
|
border: none;
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
padding: 0.3rem 0.7rem;
|
|
background: #333;
|
|
color: #ccc;
|
|
}
|
|
|
|
button:hover { background: #444; color: #fff; }
|
|
|
|
.btn-primary {
|
|
background: #2a4a7a;
|
|
color: #8bb8f0;
|
|
}
|
|
|
|
.btn-primary:hover { background: #335a90; color: #c0d8ff; }
|
|
|
|
.btn-danger { background: #4a1a1a; color: #e08080; }
|
|
.btn-danger:hover { background: #5a2020; color: #ffaaaa; }
|
|
|
|
.btn-edit { font-size: 12px; padding: 0.2rem 0.5rem; }
|
|
.btn-delete { font-size: 12px; padding: 0.2rem 0.5rem; }
|
|
|
|
/* Dialog */
|
|
dialog {
|
|
background: #242424;
|
|
border: 1px solid #444;
|
|
border-radius: 8px;
|
|
color: #e0e0e0;
|
|
padding: 1.5rem;
|
|
width: 480px;
|
|
max-width: 95vw;
|
|
}
|
|
|
|
dialog::backdrop { background: rgba(0,0,0,0.6); }
|
|
|
|
dialog h2 { margin-bottom: 1rem; font-size: 1rem; }
|
|
|
|
dialog label {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.3rem;
|
|
margin-bottom: 0.75rem;
|
|
font-size: 12px;
|
|
color: #999;
|
|
}
|
|
|
|
dialog input, dialog textarea, dialog select {
|
|
padding: 0.4rem 0.6rem;
|
|
background: #1a1a1a;
|
|
border: 1px solid #444;
|
|
border-radius: 4px;
|
|
color: #e0e0e0;
|
|
font-size: 13px;
|
|
font-family: inherit;
|
|
resize: vertical;
|
|
}
|
|
|
|
dialog input:focus, dialog textarea:focus, dialog select:focus {
|
|
outline: none;
|
|
border-color: #5588e0;
|
|
}
|
|
|
|
.dialog-buttons {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
justify-content: flex-end;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.empty-state {
|
|
color: #555;
|
|
padding: 2rem;
|
|
text-align: center;
|
|
}
|