summaryrefslogtreecommitdiff
path: root/vrsite/assets/style.css.tmpl
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-01 16:18:19 -0300
committerGabriel Schneider <[email protected]>2026-08-01 18:21:40 -0300
commit151ea12251ed876aa87bb486da1bc337e25369e9 (patch)
tree0363d90b5df6fc8b17b1737ef2793ba3825ba4d4 /vrsite/assets/style.css.tmpl
parent8ec4e135e318c7799b2576a8729493c063da4a97 (diff)
downloadnotevi-151ea12251ed876aa87bb486da1bc337e25369e9.tar.gz
notevi-151ea12251ed876aa87bb486da1bc337e25369e9.zip
Diffstat (limited to 'vrsite/assets/style.css.tmpl')
-rw-r--r--vrsite/assets/style.css.tmpl157
1 files changed, 150 insertions, 7 deletions
diff --git a/vrsite/assets/style.css.tmpl b/vrsite/assets/style.css.tmpl
index f57e454..9418087 100644
--- a/vrsite/assets/style.css.tmpl
+++ b/vrsite/assets/style.css.tmpl
@@ -111,7 +111,7 @@ nav .brand { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note.away:hover { opacity: 1; }
.atchg.away { color: var(--note); }
.atchg.away code { color: inherit; }
-.find, .filters input, .filters select, .notform input, .notform textarea, .jjform input {
+.find, .filters input, .filters select, .notform input, .notform textarea, .jjform input, .thememenu input {
background: var(--bg); color: var(--fg);
border: 1px solid var(--border); border-radius: 5px;
font: inherit; font-size: 12px; padding: 3px 6px;
@@ -153,11 +153,44 @@ nav > footer {
margin-top: 14px; border-top: 1px solid var(--border); padding-top: 8px;
display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
-nav > footer select {
+
+/* ── the theme picker ──────────────────────────────────────────
+ Every theme on the machine, previewed as you move through it. The
+ menu is fixed rather than absolute so the scrolling tree above it
+ cannot clip it. */
+#themebtn {
background: var(--panel); color: var(--muted);
border: 1px solid var(--border); border-radius: 4px;
- font: inherit; font-size: 11px; padding: 1px 2px;
+ font: inherit; font-size: 11px; padding: 1px 6px; cursor: pointer;
+ max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
+}
+#themebtn:hover, #themebtn[aria-expanded="true"] { color: var(--fg); background: var(--hover); }
+.thememenu {
+ position: fixed; left: 8px; bottom: 8px; z-index: 20;
+ width: 264px; max-height: min(60vh, 520px);
+ display: flex; flex-direction: column; gap: 6px;
+ background: var(--panel); border: 1px solid var(--border);
+ border-radius: 7px; padding: 8px;
+ box-shadow: 0 8px 30px rgb(0 0 0 / 0.35);
}
+.thememenu input { width: 100%; }
+.thememenu ul { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; }
+.thememenu li {
+ display: flex; align-items: center; gap: 7px;
+ padding: 3px 5px; border-radius: 4px; cursor: pointer;
+ font-size: 12px; color: var(--fg);
+}
+/* the menu is hidden until it is opened and the filter hides rows: both are
+ the hidden attribute, which a display of our own would otherwise outrank */
+.thememenu[hidden], .thememenu li[hidden] { display: none; }
+.thememenu li.on { background: var(--hover); }
+.thememenu li .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+.thememenu li .src { margin-left: auto; color: var(--muted); font-size: 10px; white-space: nowrap; }
+.thememenu li.cur .nm::after { content: " ✓"; color: var(--accent); }
+.thememenu .sw { display: flex; flex: none; border: 1px solid var(--border); border-radius: 3px; overflow: hidden; }
+.thememenu .sw i { display: block; width: 7px; height: 14px; }
+.thememenu .sw.none { width: 42px; border-color: transparent; }
+.thememenu .hint { margin: 0; font-size: 10px; }
/* files.html full tree */
.filetree { font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; padding-bottom: 40vh; }
@@ -256,14 +289,115 @@ aside summary { cursor: pointer; color: var(--muted); }
.note header b { margin-left: auto; color: var(--cov); font-weight: 600; }
.note p { margin: 6px 0 0; line-height: 1.45; }
.note.flash { animation: flash 1.2s ease-out; }
+
+/* A note body is markdown. It is prose about code inside a card that is
+ itself only ~320px wide in the columns, so every block here is tuned down
+ from document scale: headings barely outrank the text, rules and quotes are
+ hairlines, and nothing may push the card wider than its column. The
+ selectors carry .body so they outrank .turn p in the conversation view,
+ where notes are cards too. */
+.note .body > :first-child { margin-top: 6px; }
+.note .body p,
+.note .body ul, .note .body ol, .note .body blockquote,
+.note .body pre, .note .body table { margin: 6px 0 0; }
+.note .body p { line-height: 1.45; white-space: normal; }
+.note .body :is(h1, h2, h3, h4, h5, h6) {
+ margin: 10px 0 0; font-size: 1em; font-weight: 600; line-height: 1.3;
+}
+.note .body h1, .note .body h2 { color: var(--fg); font-size: 1.05em; }
+.note .body ul, .note .body ol { padding-left: 1.3em; }
+.note .body li { margin: 2px 0; line-height: 1.45; }
+.note .body li > p { margin: 0; }
+.note .body li::marker { color: var(--muted); }
+.note .body blockquote {
+ border-left: 2px solid var(--border); padding-left: 8px; color: var(--muted);
+}
+.note .body hr { border: none; border-top: 1px solid var(--border); margin: 10px 0 0; }
+.note .body code { background: var(--hover); border-radius: 3px; padding: 0 3px; }
+.note .body a { overflow-wrap: anywhere; }
+.note .body img { max-width: 100%; height: auto; }
+/* a fenced block: the code view's spans without its line-number scaffolding */
+.note .body pre.mdcode {
+ background: var(--panel); border: 1px solid var(--border); border-radius: 4px;
+ padding: 6px 8px; overflow-x: auto;
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em;
+ line-height: 1.4; tab-size: 4;
+}
+.note .body pre.mdcode code { background: none; padding: 0; font-size: inherit; }
+.note .body table { border-collapse: collapse; display: block; overflow-x: auto; font-size: 0.95em; }
+.note .body :is(th, td) { border: 1px solid var(--border); padding: 2px 6px; text-align: left; }
+.note .body th { color: var(--muted); font-weight: 600; }
+.note .body input[type="checkbox"] { margin-right: 4px; vertical-align: -1px; }
@keyframes flash { 0% { background: color-mix(in srgb, var(--cov) 30%, var(--bg)); } 100% { background: var(--bg); } }
.note footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; font-size: 11px; }
.note footer code { color: var(--muted); }
.note .model { opacity: 0.85; }
.note .conv { margin-left: auto; }
+.note .parent { color: var(--muted); }
+.note .relations {
+ color: var(--note); text-decoration: none;
+ background: var(--note-bg); border-radius: 3px; padding: 0 4px;
+}
+.note .relations:hover { color: var(--accent); text-decoration: underline; }
.notecols { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 14px; }
+/* the permalink: the one link on a card that names nothing but the note, so
+ it is the one to hand someone else. Quiet until wanted. */
+.note .perma { color: var(--ln); font-variant-numeric: tabular-nums; text-decoration: none; }
+.note .perma:hover { color: var(--accent); text-decoration: underline; }
+.note .perma.self { color: var(--muted); }
+
+/* ── one note, on its own page ─────────────────────────────────
+ What a shared link opens: the note, then the lines it is about. Wider
+ than a card in a list — nothing is competing for the room here. */
+.notepage { padding-bottom: 30vh; }
+.notepage .onenote .note { margin: 0 0 14px; max-width: 760px; }
+.notepage .exhead { margin: 0 0 6px; }
+.notepage .excerpt { border: 1px solid var(--border); border-radius: 6px; background: var(--panel); }
+.notepage .excerpt ol.code { padding: 6px 0; }
+.notepage .excerpt ol.code:last-of-type { padding-bottom: 6px; }
+.notepage .more { margin-top: 20px; }
+.filehead h1 .lns { color: var(--muted); font-weight: 400; }
+.filehead .kind { color: var(--note); font-style: normal; border: 1px solid var(--note); border-radius: 3px; padding: 0 4px; font-size: 11px; }
+.filehead .ago { color: var(--muted); }
+/* the excerpt exists to show what the note is about, so its lines stay
+ marked in either focus — the toggle is about reading a whole file */
+:root[data-mode="trace"] .excerpt ol.code li.noted { background: var(--note-bg); cursor: default; }
+:root[data-mode="trace"] .excerpt ol.code li.noted::before { color: color-mix(in srgb, var(--note) 55%, var(--ln)); }
+
+/* Incoming reply and mention edges share one recursively nested discussion.
+ The narrow rail is intentionally HN-like: enough hierarchy to scan without
+ turning the existing cards into a second design system. */
+.discussion { max-width: 820px; margin-top: 24px; scroll-margin-top: 16px; }
+.discussion h2 { margin-bottom: 6px; }
+.discussion h2 .meta { font-size: 11px; font-weight: 400; margin-left: 6px; }
+.threadnode {
+ display: grid; grid-template-columns: 20px minmax(0, 1fr);
+ align-items: stretch;
+}
+.threadedge { position: relative; color: var(--muted); text-align: center; font-size: 11px; }
+.threadedge::after {
+ content: ""; position: absolute; top: 20px; bottom: 0; left: 50%;
+ border-left: 1px solid var(--border);
+}
+.threadedge span { position: relative; z-index: 1; background: var(--bg); }
+.via-mention > .threadedge { color: var(--note); }
+.via-mention > .threadedge::after { border-left-style: dashed; border-left-color: var(--note); }
+.threadcontent { min-width: 0; }
+.threadcontent > .note { margin: 7px 0; }
+.threadchildren { min-width: 0; }
+.threadref {
+ margin: 8px 0; padding: 5px 8px; border: 1px dashed var(--border);
+ border-radius: 5px; background: var(--panel);
+}
+.replybox { max-width: 760px; margin: 4px 0 10px; }
+.replybox > summary { cursor: pointer; color: var(--muted); font-size: 11px; }
+.replybox[open] > summary { color: var(--accent); }
+.replyform { margin: 5px 0 10px; padding-left: 8px; border-left: 2px solid var(--border); }
+.replyform textarea { width: 100%; box-sizing: border-box; }
+.threadnode .replybox { margin-left: 1px; }
+
/* ── conversation ──────────────────────────────────────────── */
.convpage { padding: 0 16px 40vh; max-width: 1100px; }
.turn {
@@ -403,13 +537,22 @@ table.changed .st { color: var(--muted); font-size: 11px; width: 7ch; }
table.changed .st-added { color: var(--accent); }
table.changed .st-deleted { color: var(--note); }
-/* ── agent coverage colors (bitmask -> per-scheme mixed color) */
-{{range .MaskList}}.am{{.}} { --cov: var(--am{{.}}); }
+/* ── agent coverage colors ──────────────────────────────────
+ A bitmask is its agents' colors averaged. The blend is left to the
+ browser so these rules hold for any theme: a theme only has to name
+ --ag0..7, which every theme in themes.css does. */
+{{range .Masks}}.am{{.Mask}} { --cov: {{.Mix}}; }
{{end}}
-/* ── syntax (zed theme, colors are per-scheme vars) ────────── */
-{{range .Syntax}}.s-{{.Class}} { color: var(--s-{{.Class}}, inherit);{{if eq .Style "italic"}} font-style: italic;{{end}}{{if .Weight}} font-weight: {{.Weight}};{{end}} }
+/* ── syntax (theme colors, italics and weights are vars too, so
+ switching theme switches those with the colors) ─────────── */
+{{range .Syntax}}.s-{{.Class}} { color: var(--s-{{.Class}}, inherit); font-style: var(--s-{{.Class}}-fs, inherit); font-weight: var(--s-{{.Class}}-fw, inherit); }
{{end}}
@media (max-width: 1100px) {
body, body.with-aside { grid-template-columns: 1fr; }
nav, aside { position: static; height: auto; border: none; border-bottom: 1px solid var(--border); }
}
+@media (max-width: 620px) {
+ .threadnode { grid-template-columns: 14px minmax(0, 1fr); }
+ .discussion h2 .meta { display: block; margin: 2px 0 0; }
+ .replyform { padding-left: 5px; }
+}