Files
task-inventory/public/style.css
mikael-lovqvists-claude-agent 444b51794a Add Gitea markdown rendering and Edit/Preview tabs
- New /api/render-markdown proxy to Gitea (configured via config.yaml)
- lib/config.mjs loads config.yaml with yaml-js
- Edit/Preview tabs on the body field in the task dialog
- Title and body rendered as markdown inline in the task list
- Gitea markup+chroma CSS extracted and vendored to public/gitea-markup.css
- Markdown cached in memory per text string

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 18:19:29 +00:00

299 lines
5.8 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 {
margin: auto;
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;
}
/* Markdown inline in task list */
.task-title.markup, .task-body.markup {
padding: 0;
font-size: 14px;
overflow: visible;
}
.task-title.markup p { margin: 0; display: inline; }
.task-title.markup > *:first-child { margin-top: 0; }
.task-body.markup {
margin-top: 0.25rem;
font-size: 12px;
color: #aaa;
max-height: 3.5em;
overflow: hidden;
}
.task-body.markup > *:first-child { margin-top: 0; }
.task-body.markup > *:last-child { margin-bottom: 0; }
/* Field with edit/preview tabs */
.field-with-tabs {
margin-bottom: 0.75rem;
}
.tab-bar {
display: flex;
align-items: center;
gap: 2px;
margin-bottom: 0;
border-bottom: 1px solid #444;
padding-bottom: 0;
}
.tab-btn {
padding: 0.25rem 0.75rem;
border-radius: 4px 4px 0 0;
border: 1px solid transparent;
border-bottom: none;
background: transparent;
color: #888;
font-size: 12px;
margin-bottom: -1px;
}
.tab-btn.active {
background: #1a1a1a;
color: #e0e0e0;
border-color: #444;
border-bottom-color: #1a1a1a;
}
.tab-btn:hover:not(.active) { color: #ccc; }
.tab-label {
margin-left: auto;
font-size: 11px;
color: #666;
padding-right: 0.25rem;
}
.tab-pane textarea {
width: 100%;
padding: 0.4rem 0.6rem;
background: #1a1a1a;
border: 1px solid #444;
border-top: none;
border-radius: 0 0 4px 4px;
color: #e0e0e0;
font-size: 13px;
font-family: monospace;
resize: vertical;
}
.tab-pane textarea:focus {
outline: none;
border-color: #5588e0;
}
.preview-content {
min-height: 8rem;
padding: 0.6rem 0.75rem;
background: #1a1a1a;
border: 1px solid #444;
border-top: none;
border-radius: 0 0 4px 4px;
font-size: 13px;
overflow: auto;
}
.preview-content.loading { color: #555; font-style: italic; }