fix(browse): tighten vertical space above Title in the .zddc form

The first section's heading top margin (.6rem) stacked with the intro
paragraph's bottom margin (.8rem), leaving ~1.4rem of dead space above
the Title label. Drop the heading's top margin for the first section
(new `tight` flag in section()) and trim the intro's bottom margin to
.5rem. Later sections keep their inter-section gap.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZDDC 2026-06-05 16:14:03 -05:00
parent 35a1547d33
commit 252d3f173e

View file

@ -163,18 +163,21 @@
} }
var help = el('p', 'help'); var help = el('p', 'help');
help.style.cssText = 'color:var(--color-text-muted,#666);font-size:.85rem;margin:.3rem 0 .8rem;'; help.style.cssText = 'color:var(--color-text-muted,#666);font-size:.85rem;margin:.3rem 0 .5rem;';
help.textContent = editable help.textContent = editable
? 'Fill in the project options below. Structure (the folder shape, WORM, tools) is managed by the baseline and shown read-only — edit it via raw YAML if you must.' ? 'Fill in the project options below. Structure (the folder shape, WORM, tools) is managed by the baseline and shown read-only — edit it via raw YAML if you must.'
: 'Read-only — you need admin authority over this path to edit it.'; : 'Read-only — you need admin authority over this path to edit it.';
shell.appendChild(help); shell.appendChild(help);
// ── OPTION fields ─────────────────────────────────────────────────── // ── OPTION fields ───────────────────────────────────────────────────
function section(title, hint) { function section(title, hint, tight) {
var s = el('section', 'zf-section'); var s = el('section', 'zf-section');
s.style.cssText = 'margin:0 0 1rem;'; s.style.cssText = 'margin:0 0 1rem;';
var h = el('h3', null, title); var h = el('h3', null, title);
h.style.cssText = 'font-size:1em;margin:.6rem 0 .2rem;'; // `tight` drops the heading's top margin for the FIRST section so
// it doesn't stack with the intro's bottom margin (the gap above
// Title was reading as excessive). Later sections keep the gap.
h.style.cssText = 'font-size:1em;margin:' + (tight ? '0' : '.6rem') + ' 0 .2rem;';
s.appendChild(h); s.appendChild(h);
if (hint) { if (hint) {
var p = el('p', 'help', hint); var p = el('p', 'help', hint);
@ -186,7 +189,7 @@
} }
// title // title
var titleSec = section('Title', desc('title')); var titleSec = section('Title', desc('title'), true);
var titleInput = el('input'); var titleInput = el('input');
titleInput.type = 'text'; titleInput.type = 'text';
titleInput.value = (typeof data.title === 'string') ? data.title : ''; titleInput.value = (typeof data.title === 'string') ? data.title : '';