Files
projax/web/static/style.css
mAi 3901a1888e feat(phase 3f graph): visual /graph view, server-rendered SVG, layered DAG
- internal/graph package: pure-Go layered top-down DAG layout
  - LayerByLongestPath (multi-parent sits at max(parent-layer)+1)
  - OrderInLayer (slug-sort, deterministic)
  - Compute returns positions + edges + canvas size
  - cycle-safe (depth-cap)
- web/graph.go handler: filter chips reused from tree_filter
  - dim mode default (opacity 0.15 on non-matches)
  - ?isolate=1 hides non-matches + prunes orphaned edges
  - ?download=svg serves raw SVG attachment
- graph_svg.tmpl renders inline SVG: border colour by management
  (mai blue / self green / external orange / mixed dashed purple),
  opacity by status, tag pills, ×N multi-parent badge, click-navigate
- nav adds "graph" link; design.md §"Graph view" documents the surface
- 4 integration tests cover render, dim, isolate, SVG download
- 6 layout unit tests cover layering, ordering, cycle-guard
2026-05-15 19:06:57 +02:00

238 lines
15 KiB
CSS

/* projax — minimal style. Desktop browser only. */
:root {
--fg: #1a1a1a;
--muted: #6a6a6a;
--bg: #fafafa;
--bg-alt: #f0efe8;
--border: #d8d4c8;
--accent: #2f5d9e;
--warn: #b35900;
--ok: #2b7a4b;
--bad: #a02929;
}
* { box-sizing: border-box; }
html { font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--fg); background: var(--bg); }
body { margin: 0; }
header { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 8px 16px; }
header nav { display: flex; gap: 16px; align-items: center; }
header .logout-form { margin: 0 0 0 auto; }
header .logout-btn { background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px 6px; font: inherit; }
header .logout-btn:hover { color: var(--bad); text-decoration: underline; }
header .brand { font-weight: 600; font-size: 1.1em; color: var(--fg); text-decoration: none; }
header a { color: var(--accent); text-decoration: none; }
header a:hover { text-decoration: underline; }
main { padding: 16px 24px; max-width: 1100px; margin: 0 auto; }
h1 { font-size: 1.4em; margin: 0 0 8px; }
h2 { font-size: 1.1em; margin: 24px 0 8px; }
.counts { color: var(--muted); margin: 0 0 16px; }
.tree ul { list-style: none; padding-left: 18px; margin: 4px 0; border-left: 1px dotted var(--border); }
.tree > ul.forest { padding-left: 0; border-left: none; }
.node { margin: 2px 0; }
.node.area > a { font-weight: 600; }
.slug { color: var(--muted); font-family: ui-monospace, SFMono-Regular, monospace; font-size: 0.85em; margin-left: 8px; }
.status { display: inline-block; font-size: 0.75em; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--border); background: #fff; margin-left: 8px; }
.status-active { color: var(--ok); }
.status-done { color: var(--accent); }
.status-archived { color: var(--muted); }
.source { display: inline-block; font-size: 0.75em; padding: 1px 6px; border-radius: 4px; background: var(--bg-alt); border: 1px solid var(--border); }
.source-mai\.projects { color: var(--warn); }
.tag { display: inline-block; font-size: 0.72em; padding: 1px 6px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--border); margin-left: 4px; color: var(--accent); text-decoration: none; }
a.tag:hover { background: var(--accent); color: #fff; }
.tag-on { background: var(--accent); color: #fff; }
.mgmt { display: inline-block; font-size: 0.72em; padding: 1px 6px; border-radius: 4px; background: #fff; border: 1px solid var(--border); margin-left: 4px; color: var(--muted); }
.mgmt-mai { color: var(--warn); border-color: var(--warn); }
.mgmt-self { color: var(--ok); border-color: var(--ok); }
.tagbar { margin: 12px 0; padding: 8px 0; border-bottom: 1px dotted var(--border); }
.tagbar .muted { color: var(--muted); margin-right: 8px; }
.tagbar .clear { margin-left: 12px; color: var(--bad); }
.muted { color: var(--muted); }
.add { margin-left: 6px; color: var(--accent); text-decoration: none; }
.add:hover { text-decoration: underline; }
.orphans { margin-top: 32px; }
.flat { list-style: none; padding: 0; }
.flat li { padding: 4px 0; border-bottom: 1px dashed var(--border); }
.edit, .promote, .inline-promote { display: grid; gap: 12px; max-width: 720px; }
.inline-promote { display: contents; }
form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.9em; color: var(--muted); }
form label.checkbox { flex-direction: row; align-items: center; gap: 8px; }
form input[type="text"], form input:not([type]), form select, form textarea {
font: inherit; padding: 6px 8px; border: 1px solid var(--border); background: #fff; border-radius: 4px;
}
form textarea { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 0.92em; }
form .actions { display: flex; gap: 12px; align-items: center; }
button { font: inherit; padding: 6px 14px; border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 4px; cursor: pointer; }
button:hover { filter: brightness(0.92); }
.cancel { color: var(--muted); text-decoration: none; }
.cancel:hover { text-decoration: underline; color: var(--bad); }
.readonly pre { background: var(--bg-alt); padding: 12px; border: 1px solid var(--border); border-radius: 4px; white-space: pre-wrap; }
table.classify { width: 100%; border-collapse: collapse; margin-top: 16px; }
table.classify th, table.classify td { padding: 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
table.classify input, table.classify select { width: 100%; }
.error { color: var(--bad); }
/* Tasks section — HTMX-driven VTODO writeback (phase 2.b). */
.tasks .cal-block { border: 1px solid var(--border); border-radius: 4px; padding: 8px 12px; margin: 8px 0 16px; background: #fff; }
.tasks .cal-block h3 { font-size: 0.95em; margin: 0 0 8px; color: var(--muted); }
.tasks ul.todo { list-style: none; padding: 0; margin: 0; }
.tasks li.todo-row { display: flex; gap: 6px; align-items: center; padding: 4px 0; border-bottom: 1px dotted var(--border); }
.tasks li.todo-row:last-child { border-bottom: none; }
.tasks li.todo-row form.inline { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.tasks li.todo-row .todo-edit { flex: 1; }
.tasks li.todo-row .todo-edit input[type="text"] { flex: 1; min-width: 12em; }
.tasks li.todo-row button { padding: 2px 8px; }
.tasks li.todo-row button.check, .tasks li.todo-row button.x {
background: #fff; color: var(--muted); border-color: var(--border);
font-size: 1.1em; line-height: 1; padding: 2px 6px;
}
.tasks li.todo-row button.check:hover { color: var(--ok); border-color: var(--ok); }
.tasks li.todo-row button.x:hover { color: var(--bad); border-color: var(--bad); }
.tasks .todo-create { display: flex; gap: 6px; margin: 6px 0 10px; }
.tasks .todo-create input[type="text"] { flex: 1; }
.tasks ul.done .summary { color: var(--muted); text-decoration: line-through; flex: 1; }
.banner.warn { background: #fff5e6; border: 1px solid var(--warn); color: var(--warn); padding: 6px 10px; border-radius: 4px; margin: 8px 0; }
/* Issues section — Gitea-issue ingest (phase 2.d). */
.issues .repo-block { border: 1px solid var(--border); border-radius: 4px; padding: 8px 12px; margin: 8px 0 16px; background: #fff; }
.issues .repo-block h3 { font-size: 0.95em; margin: 0 0 8px; display: flex; gap: 12px; align-items: baseline; }
.issues .repo-block h3 a { color: var(--accent); text-decoration: none; }
.issues .repo-block h3 a:hover { text-decoration: underline; }
.issues ul.issues { list-style: none; padding: 0; margin: 0; }
.issues li.issue-row { display: flex; gap: 6px; align-items: baseline; padding: 4px 0; border-bottom: 1px dotted var(--border); flex-wrap: wrap; }
.issues li.issue-row:last-child { border-bottom: none; }
.issues li.issue-row .num { color: var(--muted); font-family: ui-monospace, SFMono-Regular, monospace; font-size: 0.85em; text-decoration: none; }
.issues li.issue-row .title { color: var(--fg); text-decoration: none; flex: 1; min-width: 12em; }
.issues li.issue-row .title:hover { text-decoration: underline; color: var(--accent); }
.issues li.issue-row .label { display: inline-block; font-size: 0.72em; padding: 1px 6px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--border); color: var(--accent); }
.issues li.issue-row .milestone { font-size: 0.72em; padding: 1px 6px; border-radius: 4px; background: #fff; border: 1px solid var(--border); color: var(--warn); }
.issues li.issue-row .assignee { font-size: 0.78em; color: var(--muted); }
.issues ul.closed .title { color: var(--muted); }
/* Tree-page filter bar (phase 3b). */
.tree-section { display: block; }
#tree-filterbar { padding: 12px 0; border-bottom: 1px dotted var(--border); margin-bottom: 12px; }
#tree-filterbar .search { margin: 0 0 8px; display: flex; }
#tree-filterbar .search input[type="search"] {
width: 100%; font: inherit; padding: 6px 10px;
border: 1px solid var(--border); background: #fff; border-radius: 4px;
}
#tree-filterbar .chip-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0; }
#tree-filterbar .chip-row .muted { width: 4em; flex-shrink: 0; }
.mgmt-chip, .status-chip, .has-chip {
display: inline-block; font-size: 0.78em; padding: 1px 8px; border-radius: 999px;
background: #fff; border: 1px solid var(--border); color: var(--muted); text-decoration: none;
}
.mgmt-chip:hover, .status-chip:hover, .has-chip:hover { color: var(--fg); border-color: var(--accent); }
.chip-on { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip-on:hover { color: #fff; filter: brightness(0.92); }
#tree-filterbar small { opacity: 0.75; margin-left: 2px; }
.tree-section .empty { padding: 24px; color: var(--muted); }
.tree-section .clear { color: var(--bad); }
/* Documents / PER-dated artifacts (phase 3c). */
.documents { margin-top: 24px; }
.documents .doc-add { display: flex; gap: 6px; margin: 8px 0 12px; align-items: center; flex-wrap: wrap; }
.documents .doc-add input[type="text"] { flex: 1; min-width: 8em; }
.documents ul.docs { list-style: none; padding: 0; margin: 0; }
.documents li.doc-row {
display: flex; gap: 8px; align-items: baseline; padding: 6px 0;
border-bottom: 1px dotted var(--border); flex-wrap: wrap;
}
.documents li.doc-row:last-child { border-bottom: none; }
.documents li.doc-row.highlight { background: #fff5d6; padding-left: 8px; border-left: 3px solid var(--warn); }
.documents .per {
font-family: ui-monospace, SFMono-Regular, monospace; font-size: 0.88em;
color: var(--accent); background: var(--bg-alt); padding: 1px 6px; border-radius: 4px;
}
.documents .ref-type {
display: inline-block; font-size: 0.72em; padding: 1px 6px; border-radius: 999px;
background: #fff; border: 1px solid var(--border); color: var(--muted);
}
.documents .ref-type-document { color: var(--accent); border-color: var(--accent); }
.documents .ref-type-note { color: var(--ok); border-color: var(--ok); }
.documents .ref-type-url { color: var(--warn); border-color: var(--warn); }
.documents .ref-id { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 0.85em; flex: 1; min-width: 8em; }
.documents .doc-note { color: var(--muted); font-style: italic; }
.documents .doc-remove .x {
background: #fff; color: var(--muted); border-color: var(--border);
font-size: 1.05em; line-height: 1; padding: 2px 6px;
}
.documents .doc-remove .x:hover { color: var(--bad); border-color: var(--bad); }
/* --- /admin/bulk page --- */
.bulk-section .counts { margin: 8px 0; color: var(--muted); }
#bulk-filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
#bulk-filter input[type=search] { width: 28em; }
#bulk-filter select[multiple] { min-width: 9em; }
#bulk-filter label.checkbox { display: inline-flex; align-items: center; gap: 4px; }
#bulk-actions fieldset.actions {
margin: 12px 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: 4px;
}
#bulk-actions .action-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
#bulk-actions .action-row label { display: inline-flex; flex-direction: column; font-size: 0.85em; color: var(--muted); }
#bulk-actions .action-row input, #bulk-actions .action-row select { padding: 4px 6px; }
#bulk-actions button[type=submit] { padding: 6px 14px; align-self: flex-end; }
table.bulk { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 0.92em; }
table.bulk th, table.bulk td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
table.bulk th { background: var(--bg-alt); color: var(--muted); font-weight: 500; }
table.bulk td.cell-tags .tag { margin-right: 4px; }
table.bulk .chip-x {
background: transparent; border: none; color: var(--muted); padding: 0 4px; cursor: pointer; font-size: 1em;
}
table.bulk .chip-x:hover { color: var(--bad); }
table.bulk .chip-add { display: inline-block; margin-left: 4px; }
table.bulk .chip-add input { padding: 1px 4px; font-size: 0.85em; width: 7em; }
/* --- /dashboard --- */
.dashboard .dash-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 12px; }
.dashboard .card {
border: 1px solid var(--border); border-radius: 6px; padding: 12px 16px;
background: #fff;
}
.dashboard .card header h2 { margin: 0 0 4px 0; font-size: 1.1em; }
.dashboard .card header .task-groups { display: flex; gap: 12px; flex-wrap: wrap; font-size: 0.85em; margin: 4px 0 8px; }
.dashboard .card header .task-groups .overdue { color: var(--bad); font-weight: 600; }
.dashboard .empty { padding: 8px 0; font-style: italic; }
.dashboard .task-list, .dashboard .issue-list, .dashboard .doc-list { list-style: none; padding: 0; margin: 0; }
.dashboard .task-row, .dashboard .issue-row, .dashboard .doc-row {
display: flex; gap: 8px; align-items: baseline;
padding: 6px 0; border-bottom: 1px dotted var(--border); flex-wrap: wrap;
}
.dashboard .task-row:last-child, .dashboard .issue-row:last-child, .dashboard .doc-row:last-child { border-bottom: none; }
.dashboard .task-row .check button {
background: transparent; border: 1px solid var(--border); border-radius: 3px;
padding: 0 6px; cursor: pointer; color: var(--muted);
}
.dashboard .task-row .check button:hover { color: var(--ok); border-color: var(--ok); }
.dashboard .task-row .proj, .dashboard .issue-row .proj, .dashboard .doc-row .proj {
font-family: ui-monospace, SFMono-Regular, monospace; font-size: 0.85em; color: var(--muted);
min-width: 10em;
}
.dashboard .task-row .summary { flex: 1; }
.dashboard .task-row .due { font-size: 0.85em; color: var(--muted); }
.dashboard .task-row .due.bad { color: var(--bad); font-weight: 600; }
.dashboard .task-row.bucket-overdue { background: #fff5f5; }
.dashboard .issue-row .iss { flex: 1; }
.dashboard .issue-row .label {
font-size: 0.72em; padding: 1px 6px; border-radius: 999px;
background: var(--bg-alt); color: var(--muted); border: 1px solid var(--border);
}
.dashboard .issue-row .upd { font-size: 0.8em; }
/* --- /graph --- */
.graph-canvas { overflow: auto; border: 1px solid var(--border); margin-top: 12px; background: #fafafa; }
.graph-svg { display: block; }
#graph-filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
#graph-filterbar input[type=search] { width: 22em; }
#graph-filterbar select[multiple] { min-width: 9em; }
#graph-filterbar .download { color: var(--accent); margin-left: auto; }
.graph-legend { margin: 8px 0; font-size: 0.85em; }
.graph-legend .legend-key {
display: inline-block; padding: 2px 8px; border-radius: 3px;
border: 2px solid; margin-right: 4px; font-family: ui-monospace, monospace; font-size: 0.85em;
}
.graph-legend .key-mai { border-color: #2563eb; color: #2563eb; }
.graph-legend .key-self { border-color: #15803d; color: #15803d; }
.graph-legend .key-external { border-color: #ea580c; color: #ea580c; }
.graph-legend .key-mixed { border-color: #7c3aed; color: #7c3aed; border-style: dashed; }
.graph-legend .key-unmanaged { border-color: #9ca3af; color: #9ca3af; }