diff --git a/browse/js/preview-zddc-form.js b/browse/js/preview-zddc-form.js index 6b5efd8..000898a 100644 --- a/browse/js/preview-zddc-form.js +++ b/browse/js/preview-zddc-form.js @@ -163,18 +163,21 @@ } 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 ? '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.'; shell.appendChild(help); // ── OPTION fields ─────────────────────────────────────────────────── - function section(title, hint) { + function section(title, hint, tight) { var s = el('section', 'zf-section'); s.style.cssText = 'margin:0 0 1rem;'; 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); if (hint) { var p = el('p', 'help', hint); @@ -186,7 +189,7 @@ } // title - var titleSec = section('Title', desc('title')); + var titleSec = section('Title', desc('title'), true); var titleInput = el('input'); titleInput.type = 'text'; titleInput.value = (typeof data.title === 'string') ? data.title : '';