fabrica

hanna/fabrica

style(web): make the Bookmark and Fork header buttons icon-only

ee9d0a4 · hanna committed on 2026-07-26

Drop the text labels; both are square icon buttons now with
aria-label/title for accessibility, matching the navbar icons.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed by hannaSSH key fingerprint: SHA256:4g9cWhkAAw8gwqhJUcVbSnGEvdGwklW+1Aa/fMUu59k
1 files changed · +7 −5UnifiedSplit
crates/web/src/repo.rs +7 −5
@@ -2999,13 +2999,15 @@ pub(crate) fn repo_header(
29992999 }
30003000 div class="repo-actions" {
30013001 @if ctx.viewer_id.is_some() {
3002- a class=(if ctx.bookmarked { "btn btn-active" } else { "btn" })
3003- href=(format!("/repo-bookmark/{}", ctx.repo.id)) {
3002+ @let bm_label = if ctx.bookmarked { "Remove bookmark" } else { "Bookmark" };
3003+ a class=(if ctx.bookmarked { "icon-btn btn-active" } else { "icon-btn" })
3004+ href=(format!("/repo-bookmark/{}", ctx.repo.id))
3005+ aria-label=(bm_label) title=(bm_label) {
30043006 (icon(Icon::Bookmark))
3005- span { (if ctx.bookmarked { "Bookmarked" } else { "Bookmark" }) }
30063007 }
3007- a class="btn" href=(format!("/repo-fork/{}", ctx.repo.id)) {
3008- (icon(Icon::GitFork)) span { "Fork" }
3008+ a class="icon-btn" href=(format!("/repo-fork/{}", ctx.repo.id))
3009+ aria-label="Fork" title="Fork" {
3010+ (icon(Icon::GitFork))
30093011 }
30103012 }
30113013 (branch_menu(&base, rev, branches))