~gitpocket/gitpocket

8

fix(gists): lay out the visibility radios like the repository form

commit
d2d81efd76ee70d09c0fafa721f6ca10b9618ac0 browse tree
parent
aaf04bc4fccc074542428fc5f752f4b3cdd565a7
author
~james <354576047+[email protected]>
signature
Signed by: ~james SHA256:KlzJ0P0gvJcnOYpaxD5yCUw52ImHttTKRjVAEnnYnKg
date
2026-11-14 12:41 UTC

2 files changed, +3 −3

web/static/style.css modified

@@ -194,7 +194,7 @@ input[type=file]{border:0;padding:0}
194194 .twocol{display:grid;grid-template-columns:1fr 1fr;gap:2rem;margin-bottom:2rem}
195195 .twocol label{display:flex;flex-direction:column;gap:.25rem;margin-bottom:.8rem}
196196 .twocol .legend{display:block;margin-bottom:.4rem}
197-label.radio,.twocol label.check{flex-direction:row;flex-wrap:wrap;align-items:center;gap:.4rem;margin-bottom:.6rem}
197+label.radio,form.stack label.radio,.twocol label.check{flex-direction:row;flex-wrap:wrap;align-items:center;gap:.4rem;margin-bottom:.6rem}
198198 label.radio small{flex-basis:100%;color:var(--muted);padding-left:1.4rem}
199199 label.radio input[type=radio]{width:auto;margin:0}
200200 h3.plain{border:0;font-size:1.25rem}
@@ -580,7 +580,6 @@ nav.gisttabs,nav.gistfilter{border-bottom:1px solid var(--bar);margin-bottom:.8r
580580 .gistitem .gistpreview:hover{text-decoration:none;border-color:var(--focus)}
581581 .gistedit{display:flex;flex-direction:column;gap:.3rem;border:1px solid var(--line);padding:.5rem;background:var(--raised)}
582582 .gistedit textarea{tab-size:4;white-space:pre;overflow-wrap:normal;overflow-x:auto}
583-.gistopts{display:flex;flex-wrap:wrap;gap:1rem}
584583 .gistforks{list-style:none;padding:0;margin:0 0 1rem}
585584 .revision{margin-bottom:1.2rem}
586585 h4.rule{border-bottom:1px solid var(--bar);padding-bottom:.2rem;margin:1.2rem 0 .6rem}

web/templates/gistform.tmpl modified

@@ -11,7 +11,8 @@
1111 <textarea name="content" rows="14" spellcheck="false" aria-label="Contents">{{.Content}}</textarea>
1212 </div>{{end}}
1313 {{with $d.Keep}}<p class="muted small">Kept unchanged because they are binary or too large to edit here: {{range $i, $e := .}}{{if $i}}, {{end}}<code>{{$e.Name}}</code>{{end}}.</p>{{end}}
14-<div class="gistopts">
14+<div>
15+<span class="legend">Visibility</span>
1516 <label class="radio"><input type="radio" name="visibility" value="public"{{if not $d.Secret}} checked{{end}}> Public<small>Listed on your profile and in the gist index</small></label>
1617 <label class="radio"><input type="radio" name="visibility" value="secret"{{if $d.Secret}} checked{{end}}> Secret<small>Unlisted, anyone with the link can read it</small></label>
1718 </div>