Gitfed
bastien-mrq/gitfed/ Commits/ 7afef51

Repo page: right-align Download/Settings, make them subtler

Splits the action row into two groups: main/Commits/Merge requests (frequent, left, unchanged style) and Download/Settings (less frequent, right-aligned via margin-left:auto, borderless "subtle" button style) — requested after a screenshot review of the shipped icon fix. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

bastien-mrq 2026-07-30 14:53 commit 7afef510f06dcfcbbc0dafdcf219d9ba26a82f5f parent e7c6525edcd460991f121e732ef2b2f7b4632f9a
4 files changed +20 −11
M CHANGELOG.md +4 −0
M VERSION +1 −1
M cmd/gitfed-web/handlers_repo.go +12 −10
M cmd/gitfed-web/render.go +3 −0
CHANGELOG.md
diff --git a/CHANGELOG.md b/CHANGELOG.md index 3480268..59b326e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ A bullet starting with `**BREAKING:**` flags a change gitfed-ctl's update wizard makes you acknowledge individually before it will let you upgrade past that version. +## 1.2.28 + +- Repo page action row: Download and Settings — the two less-frequent actions — now sit right-aligned with a subtler, borderless style, separate from the more frequently used main/Commits/Merge requests group on the left. + ## 1.2.27 - Fixed: the repo page's "Settings" button was missing its icon (every other button in that row — branch, Download, Commits, Merge requests — has one).
VERSION
diff --git a/VERSION b/VERSION index 3b781da..f6b839d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.27 +1.2.28
cmd/gitfed-web/handlers_repo.go
diff --git a/cmd/gitfed-web/handlers_repo.go b/cmd/gitfed-web/handlers_repo.go index fdc39b5..07a9eca 100644 --- a/cmd/gitfed-web/handlers_repo.go +++ b/cmd/gitfed-web/handlers_repo.go @@ -177,18 +177,20 @@ var repoTpl = newTpl("repo", ` </div> </details> {{end}} - {{if not .Empty}} - <details class="gf-branch-dropdown"> - <summary class="gf-btn">{{icon "download"}} {{t .Lang "repo.download"}}</summary> - <div class="gf-branch-menu"> - <a href="/repo-archive/{{.Repo.Name}}?ref={{.Branch}}&format=tar.gz">{{.Branch}}.tar.gz</a> - <a href="/repo-archive/{{.Repo.Name}}?ref={{.Branch}}&format=zip">{{.Branch}}.zip</a> - </div> - </details> - {{end}} {{if not .Empty}}<a href="/repo-commits/{{.Repo.Name}}" class="gf-btn">{{icon "history"}} {{t .Lang "repo.commits_title"}}{{if .CommitCount}} ({{.CommitCount}}){{end}}</a>{{end}} {{if not .Empty}}<a href="/repo-mrs/{{.Repo.Name}}" class="gf-btn">{{icon "branch"}} {{t .Lang "mr.list_title"}}</a>{{end}} - {{if .CanAdminister}}<a href="/repo-settings/{{.Repo.Name}}" class="gf-btn">{{icon "settings"}} {{t .Lang "nav.settings"}}</a>{{end}} + <div class="gf-actions-right"> + {{if not .Empty}} + <details class="gf-branch-dropdown"> + <summary class="gf-btn subtle">{{icon "download"}} {{t .Lang "repo.download"}}</summary> + <div class="gf-branch-menu"> + <a href="/repo-archive/{{.Repo.Name}}?ref={{.Branch}}&format=tar.gz">{{.Branch}}.tar.gz</a> + <a href="/repo-archive/{{.Repo.Name}}?ref={{.Branch}}&format=zip">{{.Branch}}.zip</a> + </div> + </details> + {{end}} + {{if .CanAdminister}}<a href="/repo-settings/{{.Repo.Name}}" class="gf-btn subtle">{{icon "settings"}} {{t .Lang "nav.settings"}}</a>{{end}} + </div> </div> {{if .Repo.Public}}
cmd/gitfed-web/render.go
diff --git a/cmd/gitfed-web/render.go b/cmd/gitfed-web/render.go index 5903f1e..526e94f 100644 --- a/cmd/gitfed-web/render.go +++ b/cmd/gitfed-web/render.go @@ -426,6 +426,9 @@ const shellHeadSrc = `<!doctype html> .gf-repo-head .count { font-family: var(--mono); font-size: 0.82rem; color: var(--text-faint); } .gf-actions-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 1rem 0 0.7rem; } .gf-actions-row .gf-btn { margin-top: 0; } + .gf-actions-right { margin-left: auto; display: flex; align-items: center; gap: 0.4rem; } + .gf-btn.subtle { background: transparent; border-color: transparent; color: var(--text-dim); font-weight: 500; } + .gf-btn.subtle:hover { background: var(--surface-2); color: var(--text); } .gf-pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1rem 0; } .gf-pager .gf-btn { margin-top: 0; } .gf-pager .gf-btn.disabled { opacity: 0.4; pointer-events: none; }