Commit 534f5f1168

534f5f11681d247ef94f1d5e8704ea7662d63328

parent: e52efaeb3a

Verified · cmc

cmc <hello@cleberg.net> · 2026-09-18 04:09 UTC

web: caption spans instead of dangling labels

<label>SSH</label>, <label>HTTPS</label> in tree.html and <label>Visibility</label>
in settings.html did not label a control; switch them to
<span class="fieldname">. .clone label becomes .clone .fieldname, and a
general .fieldname rule matches the base label's size and weight.

Ref #221
e2e/design_test.go +1 −1
@@ -363,7 +363,7 @@ func TestTreeSearchCodeAndClone(t *testing.T) {
363363 if i, j := strings.Index(body, `<table class="tree">`), strings.Index(body, `<div class="clone">`); i < 0 || j < i {
364364 t.Error("clone block does not follow the file table")
365365 }
366 if !strings.Contains(body, `<label>SSH</label>`) || !strings.Contains(body, `<label>HTTPS</label>`) {
366 if !strings.Contains(body, `<span class="fieldname">SSH</span>`) || !strings.Contains(body, `<span class="fieldname">HTTPS</span>`) {
367367 t.Error("clone blocks are not labelled")
368368 }
369369 // Clone and about belong to the repository root, not a subdirectory.
internal/web/static/style.css +2 −1
@@ -581,6 +581,7 @@ input[type="radio"] { accent-color: var(--fill); }
581581label { display: block; font-weight: 500; font-size: var(--fs-2); margin-bottom: 4px; }
582582label:has(> input[type="radio"]), label:has(> input[type="checkbox"]),
583583label:has(> select) { display: inline-flex; align-items: center; gap: var(--sp-2); }
584.fieldname { display: block; font-size: var(--fs-2); font-weight: 500; }
584585.hint { display: block; color: var(--muted); font-size: var(--fs-1); font-weight: 400; margin: 0 0 6px; }
585586.field { margin-bottom: var(--sp-4); }
586587.field input[type="text"], .field input[type="email"], .field select { width: 100%; }
@@ -1331,7 +1332,7 @@ details.refmenu .refdrop a.allrefs {
13311332}
13321333.clone { margin: 0 0 var(--sp-3); }
13331334.facts .about { min-width: 0; }
1334.clone label { font-size: var(--fs-1); color: var(--muted); font-weight: 500; margin-bottom: 2px; }
1335.clone .fieldname { font-size: var(--fs-1); color: var(--muted); font-weight: 500; margin-bottom: 2px; }
13351336.clone pre { margin-bottom: var(--sp-3); user-select: all; }
13361337.factgrid { display: grid; grid-template-columns: repeat(4, auto); gap: var(--sp-2) var(--sp-4); font-size: var(--fs-2); margin-bottom: var(--sp-3); }
13371338.factgrid b { font-weight: 600; }
internal/web/templates/settings.html +1 −1
@@ -36,7 +36,7 @@
3636<section id="access"><h2>Access</h2>
3737<form method="post" action="{{$base}}" class="setform">
3838 <input type="hidden" name="field" value="visibility">
39 <div><label>Visibility</label><p class="hint">Private repositories answer not found to everyone without access, including in search and on your profile.</p></div>
39 <div><span class="fieldname">Visibility</span><p class="hint">Private repositories answer not found to everyone without access, including in search and on your profile.</p></div>
4040 <div class="check">
4141 <label><input type="radio" name="visibility" value="public"{{if eq .Repo.Visibility "public"}} checked{{end}}> Public</label>
4242 <label><input type="radio" name="visibility" value="private"{{if eq .Repo.Visibility "private"}} checked{{end}}> Private</label>
internal/web/templates/tree.html +2 −2
@@ -32,8 +32,8 @@
3232{{if and .Entries (not .DirPath)}}<div class="facts">
3333 <div class="clone">
3434 <h2>Clone</h2>
35 <label>SSH</label><pre><code>git clone {{.SSHCloneURL}}</code></pre>
36 <label>HTTPS</label><pre><code>git clone {{.CloneURL}}</code></pre>
35 <span class="fieldname">SSH</span><pre><code>git clone {{.SSHCloneURL}}</code></pre>
36 <span class="fieldname">HTTPS</span><pre><code>git clone {{.CloneURL}}</code></pre>
3737 </div>
3838 {{if .Facts.Commits}}{{$r := printf "/%s/%s" .Repo.OwnerName .Repo.Name}}<div class="about">
3939 <h2>About</h2>