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

Layout: unified · split

e2e/design_test.go +1 −1
@@ -363,7 +363,7 @@ func TestTreeSearchCodeAndClone(t *testing.T) {
363 if i, j := strings.Index(body, `<table class="tree">`), strings.Index(body, `<div class="clone">`); i < 0 || j < i { 363 if i, j := strings.Index(body, `<table class="tree">`), strings.Index(body, `<div class="clone">`); i < 0 || j < i {
364 t.Error("clone block does not follow the file table") 364 t.Error("clone block does not follow the file table")
365 } 365 }
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>`) {
367 t.Error("clone blocks are not labelled") 367 t.Error("clone blocks are not labelled")
368 } 368 }
369 // Clone and about belong to the repository root, not a subdirectory. 369 // 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); }
581label { display: block; font-weight: 500; font-size: var(--fs-2); margin-bottom: 4px; } 581label { display: block; font-weight: 500; font-size: var(--fs-2); margin-bottom: 4px; }
582label:has(> input[type="radio"]), label:has(> input[type="checkbox"]), 582label:has(> input[type="radio"]), label:has(> input[type="checkbox"]),
583label:has(> select) { display: inline-flex; align-items: center; gap: var(--sp-2); } 583label:has(> select) { display: inline-flex; align-items: center; gap: var(--sp-2); }
584.fieldname { display: block; font-size: var(--fs-2); font-weight: 500; }
584.hint { display: block; color: var(--muted); font-size: var(--fs-1); font-weight: 400; margin: 0 0 6px; } 585.hint { display: block; color: var(--muted); font-size: var(--fs-1); font-weight: 400; margin: 0 0 6px; }
585.field { margin-bottom: var(--sp-4); } 586.field { margin-bottom: var(--sp-4); }
586.field input[type="text"], .field input[type="email"], .field select { width: 100%; } 587.field input[type="text"], .field input[type="email"], .field select { width: 100%; }
@@ -1331,7 +1332,7 @@ details.refmenu .refdrop a.allrefs {
1331} 1332}
1332.clone { margin: 0 0 var(--sp-3); } 1333.clone { margin: 0 0 var(--sp-3); }
1333.facts .about { min-width: 0; } 1334.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; }
1335.clone pre { margin-bottom: var(--sp-3); user-select: all; } 1336.clone pre { margin-bottom: var(--sp-3); user-select: all; }
1336.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); } 1337.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); }
1337.factgrid b { font-weight: 600; } 1338.factgrid b { font-weight: 600; }
internal/web/templates/settings.html +1 −1
@@ -36,7 +36,7 @@
36<section id="access"><h2>Access</h2> 36<section id="access"><h2>Access</h2>
37<form method="post" action="{{$base}}" class="setform"> 37<form method="post" action="{{$base}}" class="setform">
38 <input type="hidden" name="field" value="visibility"> 38 <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>
40 <div class="check"> 40 <div class="check">
41 <label><input type="radio" name="visibility" value="public"{{if eq .Repo.Visibility "public"}} checked{{end}}> Public</label> 41 <label><input type="radio" name="visibility" value="public"{{if eq .Repo.Visibility "public"}} checked{{end}}> Public</label>
42 <label><input type="radio" name="visibility" value="private"{{if eq .Repo.Visibility "private"}} checked{{end}}> Private</label> 42 <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 @@
32{{if and .Entries (not .DirPath)}}<div class="facts"> 32{{if and .Entries (not .DirPath)}}<div class="facts">
33 <div class="clone"> 33 <div class="clone">
34 <h2>Clone</h2> 34 <h2>Clone</h2>
35 <label>SSH</label><pre><code>git clone {{.SSHCloneURL}}</code></pre> 35 <span class="fieldname">SSH</span><pre><code>git clone {{.SSHCloneURL}}</code></pre>
36 <label>HTTPS</label><pre><code>git clone {{.CloneURL}}</code></pre> 36 <span class="fieldname">HTTPS</span><pre><code>git clone {{.CloneURL}}</code></pre>
37 </div> 37 </div>
38 {{if .Facts.Commits}}{{$r := printf "/%s/%s" .Repo.OwnerName .Repo.Name}}<div class="about"> 38 {{if .Facts.Commits}}{{$r := printf "/%s/%s" .Repo.OwnerName .Repo.Name}}<div class="about">
39 <h2>About</h2> 39 <h2>About</h2>