aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-06-15 23:12:08 +0800
committerGitHub <noreply@github.com>2023-06-15 15:12:08 +0000
commit6db66d8ca4faeb03b958728923ce27bdabdae7a5 (patch)
tree03f53d4b21b4bc74c3f964ae6cfcee61e580ef17 /templates/repo
parent14b802e7ad18704d7ee9471bddb47c74a9ba9235 (diff)
downloadgitea-6db66d8ca4faeb03b958728923ce27bdabdae7a5.tar.gz
gitea-6db66d8ca4faeb03b958728923ce27bdabdae7a5.zip
Fix some UI alignments (#25277)
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 `+`
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/commits.tmpl2
-rw-r--r--templates/repo/home.tmpl8
-rw-r--r--templates/repo/wiki/view.tmpl2
3 files changed, 6 insertions, 6 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" .}}
<div class="ui container">
{{template "repo/sub_menu" .}}
- <div class="repo-button-row gt-df gt-ac gt-sb gt-fw gt-mb-4 gt-mt-3">
+ <div class="repo-button-row">
<div class="gt-df gt-ac">
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}}
<a href="{{.RepoLink}}/graph" class="ui basic small compact button">
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}}
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}}
<div class="ui container">
- <div class="repo-button-row gt-df gt-ac gt-sb gt-fw">
+ <div class="repo-button-row">
<div class="gt-df gt-ac">
<div class="ui floating filter dropdown" data-no-results="{{.locale.Tr "repo.pulls.no_results"}}">
<div class="ui basic small button">