From 783f7ccb2c84f41a3b33ccfe4a8212361266dd87 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Thu, 15 Jun 2023 20:32:59 -0400 Subject: [PATCH] Fix some UI alignments (#25277) (#25290) Backport #25277 by @wxiaoguang Fixes: https://github.com/go-gitea/gitea/issues/25282 Fix the problems: 1. The `repo-button-row` had various patches before, this PR makes it consistent 2. The "Add File" has wrong CSS class "icon", remove it 3. The "Add File" padding was overridden by "!important", fix it by `.repo-button-row .button.dropdown` with comment 4. The selector `.ui.segments ~ .ui.top.attached.header` is incorrect, it should use `+` The `repo-button-row` is only used on 3 pages: ![image](https://github.com/go-gitea/gitea/assets/2114189/16057ff0-7d30-41ca-ac13-70d074364566) ![image](https://github.com/go-gitea/gitea/assets/2114189/cbe2acb1-07b6-48f3-9f28-407a75f8c4ed) ![image](https://github.com/go-gitea/gitea/assets/2114189/341416b3-f6a8-466f-a140-361ee80e53a7) ![image](https://github.com/go-gitea/gitea/assets/2114189/3d4b7857-ef99-4a3f-a667-9890714a096d) Co-authored-by: wxiaoguang --- templates/repo/commits.tmpl | 2 +- templates/repo/home.tmpl | 8 ++++---- templates/repo/wiki/view.tmpl | 2 +- web_src/css/base.css | 4 ++-- web_src/css/repo.css | 23 ++++++++++------------- 5 files changed, 18 insertions(+), 21 deletions(-) diff --git a/templates/repo/commits.tmpl b/templates/repo/commits.tmpl index 1647d69597..3400dbd251 100644 --- a/templates/repo/commits.tmpl +++ b/templates/repo/commits.tmpl @@ -3,7 +3,7 @@ {{template "repo/header" .}}
{{template "repo/sub_menu" .}} -
+
{{end}} {{template "repo/sub_menu" .}} -
+
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}} {{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}} @@ -84,8 +84,9 @@ {{end}} {{if and .CanWriteCode .IsViewBranch (not .Repository.IsArchived)}} - {{end}} diff --git a/templates/repo/wiki/view.tmpl b/templates/repo/wiki/view.tmpl index 370109caa4..ee9a3b2142 100644 --- a/templates/repo/wiki/view.tmpl +++ b/templates/repo/wiki/view.tmpl @@ -3,7 +3,7 @@ {{template "repo/header" .}} {{$title := .title}}
-
+