Files
projax/web/templates/layout.tmpl
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

28 lines
828 B
Cheetah

{{define "layout"}}<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{.Title}} — projax</title>
<link rel="stylesheet" href="/static/style.css">
<script src="https://unpkg.com/htmx.org@1.9.12" integrity="sha384-ujb1lZYygJmzgSwoxRggbCHcjc0rB2XoQrxeTUQyRjrOnlCoYta87iKBWq3EsdM2" crossorigin="anonymous"></script>
</head>
<body>
<header>
<nav>
<a href="/" class="brand">projax</a>
<a href="/dashboard">dashboard</a>
<a href="/graph">graph</a>
<a href="/admin/classify">classify orphans</a>
<a href="/admin/bulk">bulk edit</a>
<a href="/admin/caldav">caldav</a>
<form method="post" action="/logout" class="logout-form">
<button type="submit" class="logout-btn">sign out</button>
</form>
</nav>
</header>
<main>
{{template "content" .}}
</main>
</body>
</html>{{end}}