diff options
author | Giteabot <teabot@gitea.io> | 2023-06-15 20:32:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-16 00:32:59 +0000 |
commit | 783f7ccb2c84f41a3b33ccfe4a8212361266dd87 (patch) | |
tree | b64980cf95db43327f8ef7b04e5ba628687de6f7 /templates/repo/home.tmpl | |
parent | 3f75fbf8fe01323af280acdbd1ddb19e222f92f7 (diff) | |
download | gitea-783f7ccb2c84f41a3b33ccfe4a8212361266dd87.tar.gz gitea-783f7ccb2c84f41a3b33ccfe4a8212361266dd87.zip |
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 <wxiaoguang@gmail.com>
Diffstat (limited to 'templates/repo/home.tmpl')
-rw-r--r-- | templates/repo/home.tmpl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index a679de5027..a983de5a48 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -61,7 +61,7 @@ </div> {{end}} {{template "repo/sub_menu" .}} - <div class="repo-button-row gt-df gt-ac gt-sb gt-fw"> + <div class="repo-button-row"> <div class="gt-df gt-ac gt-fw gt-gap-y-3"> {{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)}} - <button class="ui basic compact dropdown jump icon button gt-mr-2"{{if not .Repository.CanEnableEditor}} disabled{{end}}> - <span class="text">{{.locale.Tr "repo.editor.add_file"}}</span> + <button class="ui dropdown basic compact jump button gt-mr-2"{{if not .Repository.CanEnableEditor}} disabled{{end}}> + {{.locale.Tr "repo.editor.add_file"}} + {{svg "octicon-triangle-down" 14 "dropdown icon"}} <div class="menu"> <a class="item" href="{{.RepoLink}}/_new/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}"> {{.locale.Tr "repo.editor.new_file"}} @@ -99,7 +100,6 @@ {{.locale.Tr "repo.editor.patch"}} </a> </div> - {{svg "octicon-triangle-down" 14 "dropdown icon"}} </button> {{end}} |