loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 `+`

authored by

wxiaoguang and committed by
GitHub
6db66d8c 14b802e7

+18 -21
+1 -1
templates/repo/commits.tmpl
··· 3 3 {{template "repo/header" .}} 4 4 <div class="ui container"> 5 5 {{template "repo/sub_menu" .}} 6 - <div class="repo-button-row gt-df gt-ac gt-sb gt-fw gt-mb-4 gt-mt-3"> 6 + <div class="repo-button-row"> 7 7 <div class="gt-df gt-ac"> 8 8 {{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}} 9 9 <a href="{{.RepoLink}}/graph" class="ui basic small compact button">
+4 -4
templates/repo/home.tmpl
··· 61 61 </div> 62 62 {{end}} 63 63 {{template "repo/sub_menu" .}} 64 - <div class="repo-button-row gt-df gt-ac gt-sb gt-fw"> 64 + <div class="repo-button-row"> 65 65 <div class="gt-df gt-ac gt-fw gt-gap-y-3"> 66 66 {{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}} 67 67 {{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}} ··· 84 84 {{end}} 85 85 86 86 {{if and .CanWriteCode .IsViewBranch (not .Repository.IsArchived)}} 87 - <button class="ui basic compact dropdown jump icon button gt-mr-2"{{if not .Repository.CanEnableEditor}} disabled{{end}}> 88 - <span class="text">{{.locale.Tr "repo.editor.add_file"}}</span> 87 + <button class="ui dropdown basic compact jump button gt-mr-2"{{if not .Repository.CanEnableEditor}} disabled{{end}}> 88 + {{.locale.Tr "repo.editor.add_file"}} 89 + {{svg "octicon-triangle-down" 14 "dropdown icon"}} 89 90 <div class="menu"> 90 91 <a class="item" href="{{.RepoLink}}/_new/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}"> 91 92 {{.locale.Tr "repo.editor.new_file"}} ··· 99 100 {{.locale.Tr "repo.editor.patch"}} 100 101 </a> 101 102 </div> 102 - {{svg "octicon-triangle-down" 14 "dropdown icon"}} 103 103 </button> 104 104 {{end}} 105 105
+1 -1
templates/repo/wiki/view.tmpl
··· 3 3 {{template "repo/header" .}} 4 4 {{$title := .title}} 5 5 <div class="ui container"> 6 - <div class="repo-button-row gt-df gt-ac gt-sb gt-fw"> 6 + <div class="repo-button-row"> 7 7 <div class="gt-df gt-ac"> 8 8 <div class="ui floating filter dropdown" data-no-results="{{.locale.Tr "repo.pulls.no_results"}}"> 9 9 <div class="ui basic small button">
+2 -2
web_src/css/base.css
··· 2099 2099 } 2100 2100 2101 2101 /* if a .top.attached.header is followed by a .segment, add some margin */ 2102 - .ui.segments ~ .ui.top.attached.header, 2103 - .ui.attached.segment ~ .ui.top.attached.header { 2102 + .ui.segments + .ui.top.attached.header, 2103 + .ui.attached.segment + .ui.top.attached.header { 2104 2104 margin-top: 1rem; 2105 2105 } 2106 2106
+10 -13
web_src/css/repo.css
··· 2693 2693 } 2694 2694 2695 2695 .repo-button-row { 2696 - margin-bottom: 10px; 2697 - } 2698 - 2699 - .repo-button-row > * { 2700 - margin-top: 8px; 2701 - } 2702 - 2703 - .wiki .repo-button-row { 2704 - margin-bottom: 0; 2705 - } 2706 - 2707 - .wiki .repo-button-row > * { 2708 - margin-top: 0; 2696 + margin: 10px 0; 2697 + display: flex; 2698 + align-items: center; 2699 + gap: 0.5em; 2700 + flex-wrap: wrap; 2701 + justify-content: space-between; 2709 2702 } 2710 2703 2711 2704 .repo-button-row .button { 2712 2705 padding: 6px 10px !important; 2713 2706 height: 30px; 2707 + } 2708 + 2709 + .repo-button-row .button.dropdown { 2710 + padding-right: 22px !important; /* normal buttons have !important paddings, so we need to override it for dropdown (Add File) icons */ 2714 2711 } 2715 2712 2716 2713 .repo-button-row input {