summaryrefslogtreecommitdiff
path: root/vrsite/templates/layout.tmpl
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-02 23:43:08 -0300
committerGabriel Schneider <[email protected]>2026-08-03 09:54:39 -0300
commit5ec72f8723d795d0b02d7e9ebb9f555f0c7e6a2e (patch)
treef12f4b700fff4ff6f7e818d2a542672ba0b8d76e /vrsite/templates/layout.tmpl
parenta9263daee9413c5eff3c1f1bebcd224442fd8685 (diff)
downloadnotevi-5ec72f8723d795d0b02d7e9ebb9f555f0c7e6a2e.tar.gz
notevi-5ec72f8723d795d0b02d7e9ebb9f555f0c7e6a2e.zip
rebrand to notevi: one CLI over the jj sidecar
vr and vrsite become a single binary. vrsite/ folds into a web package in one module (0x4200.cafe/notevi); "notevi web" serves and exports exactly what vrsite did, and "notevi read/grep/note/query" is unchanged. The sidecar is renamed with it: notevi_log, notevi-log.jsonl, and the description "private: notevi log". The pre-rebrand names are still recognized, so an old repository opens and reads; it is renamed in place on the first write, or up front with "notevi migrate DIR...". That rename cannot be a single mv inside jj run. jj only auto-tracks a *new* file in the run working copy below a size limit it does not take from the command line, so writing a whole log under a name the change has never held is silently dropped while jj reports success. ensureLogFile creates the file empty first and lets every later byte be a modification of a tracked file, which snapshots at any size; that also fixes the same latent bug when importing a large legacy vr-log.jsonl. Adds a bem-te-vi mark (favicon and nav brand) and a README. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Diffstat (limited to 'vrsite/templates/layout.tmpl')
-rw-r--r--vrsite/templates/layout.tmpl93
1 files changed, 0 insertions, 93 deletions
diff --git a/vrsite/templates/layout.tmpl b/vrsite/templates/layout.tmpl
deleted file mode 100644
index a11ef16..0000000
--- a/vrsite/templates/layout.tmpl
+++ /dev/null
@@ -1,93 +0,0 @@
-<!doctype html>
-<html lang="en"{{if .Live}} data-live="1"{{end}}>
-<head>
-<meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<title>{{.Title}}</title>
-<link rel="stylesheet" href="{{.Href "asset" "style.css"}}">
-<script>
-// the theme is worn before the first paint. A theme that is not one of the
-// two the site was built with lives in themes.css, so pull that in too —
-// from here, after style.css, so its :root block is the one that wins.
-{const d = document.documentElement, t = localStorage.getItem("vrsite-theme");
- if (t && t !== "system") d.dataset.theme = t;
- if (t && !/^(system|dark|light)$/.test(t)) {
- const l = document.createElement("link");
- l.rel = "stylesheet"; l.id = "themescss"; l.href = "{{.Href "asset" "themes.css"}}";
- document.head.append(l);
- }
- d.dataset.mode = localStorage.getItem("vrsite-mode") || "trace";
- d.dataset.files = localStorage.getItem("vrsite-files-hidden") === "1" ? "hidden" : "shown";}
-</script>
-{{if .Live}}<script src="{{.Href "asset" "htmx.min.js"}}"></script>{{end}}
-<script src="{{.Href "asset" "app.js"}}" defer></script>
-</head>
-<body{{if eq .Kind "file"}} class="with-aside"{{end}} data-kind="{{.Kind}}">
-
-<nav aria-label="repository files" id="nav" data-root="{{.Root}}" data-current="{{.Current}}" data-tree="{{.Href "tree"}}">
- <header>
- <a class="brand" href="{{.Href ""}}">{{.Site.Title}}</a>
- <div class="modes" role="group" aria-label="focus">
- <button type="button" class="mode" data-mode="trace" title="reading coverage (t)">trace</button>
- <button type="button" class="mode" data-mode="notes" title="notes and comments (t)">notes</button>
- </div>
- </header>
- {{template "changebar" .}}
- {{if .Live}}
- <div id="activity" class="activity" hx-get="{{.Href "activity"}}?compact=1" hx-trigger="load, every 3s" hx-swap="innerHTML"></div>
- {{end}}
- <button type="button" id="filetoggle" aria-controls="filelist" aria-expanded="true">hide files</button>
- <div id="filelist">
- <input id="filefind" class="find" type="search" placeholder="find file…" aria-label="find file" autocomplete="off" spellcheck="false">
- <div id="tree"><p class="meta hint">loading tree…</p></div>
- </div>
- <footer>
- <span>
- {{if and .Live (ne .Root "/")}}<a href="/">projects</a> · {{end}}
- <a href="{{.Href "notes"}}">notes ({{len .Site.Notes}})</a> ·
- <a href="{{.Href "files"}}">files</a>{{if .Live}} ·
- <a href="{{.Href "jj"}}">jj</a>{{end}}
- </span>
- <div class="themepick" id="themepick"
- data-js="{{.Href "asset" "themes.js"}}" data-css="{{.Href "asset" "themes.css"}}"
- data-dark="{{.Site.Theme.Name}}" data-light="{{.Site.Light.Name}}"
- data-darkid="{{.Site.Theme.ID}}" data-lightid="{{.Site.Light.ID}}">
- <button type="button" id="themebtn" aria-haspopup="listbox" aria-expanded="false"
- title="theme — every one installed here (T)">theme</button>
- <div class="thememenu" id="thememenu" hidden>
- <input id="themefind" type="search" placeholder="filter themes…" aria-label="filter themes"
- role="combobox" aria-controls="themelist" aria-autocomplete="list"
- autocomplete="off" spellcheck="false">
- <ul id="themelist" role="listbox" aria-label="themes"></ul>
- <p class="meta hint">↑↓ preview · enter keeps · esc puts it back</p>
- </div>
- </div>
- </footer>
-</nav>
-
-<main>
-{{if .Err}}<p class="err">{{.Err}}</p>{{end}}
-{{if eq .Kind "file"}}{{template "page-file" .}}
-{{else if eq .Kind "notes"}}{{template "page-notes" .}}
-{{else if eq .Kind "note"}}{{template "page-note" .}}
-{{else if eq .Kind "files"}}{{template "page-files" .}}
-{{else if eq .Kind "jj"}}{{template "page-jj" .}}
-{{else if eq .Kind "change"}}{{template "page-change" .}}
-{{else if eq .Kind "session"}}{{template "page-session" .}}
-{{else}}{{template "page-index" .}}{{end}}
-</main>
-
-{{if eq .Kind "file"}}
-<aside aria-label="notes" class="notes-only">
- <header class="asidehead">
- <b>Notes (<span id="notecount">{{len .File.Notes}}</span>)</b>
- {{if .Live}}<span class="meta">click a line to attach</span>{{end}}
- </header>
- {{if .Live}}{{template "noteform" .}}{{end}}
- <div id="notelist">{{range .File.Notes}}{{template "note" (dict "N" . "P" $)}}{{end}}</div>
- {{if not .File.Notes}}<p class="meta hint">no notes on this file yet</p>{{end}}
-</aside>
-{{end}}
-
-</body>
-</html>