From 507280b073665f9ca28e4b113712e6294950d485 Mon Sep 17 00:00:00 2001 From: 0ko <0ko@noreply.codeberg.org> Date: Mon, 21 Apr 2025 04:25:08 +0000 Subject: [PATCH] fix(ui): use gap in switch items (#7581) Followup to PRs where the old switches were converted to this one. The main change here is to the switch with counter. It was missing a gap. Additionally, it removes tailwind helpers the other switches retained from before switch refactors, because they are now using gap. Preview: https://codeberg.org/attachments/6191f55e-0b61-49fa-ba8f-cd9c93ca7bd4 https://codeberg.org/attachments/a03fb681-45b7-40f5-929e-55154abeb20d No visual change to the ones with icons. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7581 Reviewed-by: Gusted --- templates/projects/list.tmpl | 4 ++-- templates/repo/graph.tmpl | 4 ++-- templates/repo/issue/openclose.tmpl | 10 +++++----- templates/user/dashboard/issues.tmpl | 4 ++-- templates/user/dashboard/milestones.tmpl | 4 ++-- web_src/css/modules/switch.css | 1 + 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/templates/projects/list.tmpl b/templates/projects/list.tmpl index 5a9ba004eb..8c9b7c6e6f 100644 --- a/templates/projects/list.tmpl +++ b/templates/projects/list.tmpl @@ -2,11 +2,11 @@
diff --git a/templates/repo/graph.tmpl b/templates/repo/graph.tmpl index 739c5954b1..b6211bd5d8 100644 --- a/templates/repo/graph.tmpl +++ b/templates/repo/graph.tmpl @@ -48,11 +48,11 @@
diff --git a/templates/repo/issue/openclose.tmpl b/templates/repo/issue/openclose.tmpl index 25f73a857d..5d5cf4140e 100644 --- a/templates/repo/issue/openclose.tmpl +++ b/templates/repo/issue/openclose.tmpl @@ -1,21 +1,21 @@
{{if .PageIsMilestones}} - {{svg "octicon-milestone" 16 "tw-mr-2"}} + {{svg "octicon-milestone" 16}} {{else if .PageIsPullList}} - {{svg "octicon-git-pull-request" 16 "tw-mr-2"}} + {{svg "octicon-git-pull-request" 16}} {{else}} - {{svg "octicon-issue-opened" 16 "tw-mr-2"}} + {{svg "octicon-issue-opened" 16}} {{end}} {{ctx.Locale.PrettyNumber .OpenCount}} {{ctx.Locale.Tr "repo.issues.open_title"}} - {{svg "octicon-issue-closed" 16 "tw-mr-2"}} + {{svg "octicon-issue-closed" 16}} {{ctx.Locale.PrettyNumber .ClosedCount}} {{ctx.Locale.Tr "repo.issues.closed_title"}} {{if not .PageIsMilestones}} - {{svg "octicon-eye" 16 "tw-mr-2"}} + {{svg "octicon-eye" 16}} {{ctx.Locale.PrettyNumber (.AllCount)}} {{ctx.Locale.Tr "repo.issues.all_title"}} {{end}} diff --git a/templates/user/dashboard/issues.tmpl b/templates/user/dashboard/issues.tmpl index e25a9d8219..c76a61c393 100644 --- a/templates/user/dashboard/issues.tmpl +++ b/templates/user/dashboard/issues.tmpl @@ -6,11 +6,11 @@
diff --git a/templates/user/dashboard/milestones.tmpl b/templates/user/dashboard/milestones.tmpl index 01dcbec1c9..267d5e3534 100644 --- a/templates/user/dashboard/milestones.tmpl +++ b/templates/user/dashboard/milestones.tmpl @@ -37,11 +37,11 @@
diff --git a/web_src/css/modules/switch.css b/web_src/css/modules/switch.css index a9499a84aa..7780155787 100644 --- a/web_src/css/modules/switch.css +++ b/web_src/css/modules/switch.css @@ -11,6 +11,7 @@ .switch .item { display: flex; + gap: 0.5rem; align-items: center; padding: .5em 1.125em; color: var(--color-text);