]> source.dussan.org Git - gitea.git/commitdiff
Optimize repo-list layout to enhance visual experience (#31272) (#31276)
authorGiteabot <teabot@gitea.io>
Fri, 7 Jun 2024 04:37:47 +0000 (12:37 +0800)
committerGitHub <noreply@github.com>
Fri, 7 Jun 2024 04:37:47 +0000 (04:37 +0000)
Backport #31272 by @kerwin612

before:

![1717655078227](https://github.com/go-gitea/gitea/assets/3371163/4d564f96-c2f8-46b1-996f-6cc7abb940ef)
***The problem was that the icon and text were not on a horizontal line,
and the horizontal was not centered;***

after:

![1717655094071](https://github.com/go-gitea/gitea/assets/3371163/b11797f6-05f8-486c-b5fd-df89d0cbdcfd)

Co-authored-by: Kerwin Bryant <kerwin612@qq.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
templates/user/settings/repos.tmpl
web_src/css/user.css

index 26b9dfeed98ad0d9bd6d6bab993106ee32193bec..a50fb586c7fd22f8908bf76b68aec02dbd1c8933 100644 (file)
                                        <div class="ui middle aligned divided list">
                                                {{range .Repos}}
                                                        <div class="item">
-                                                               <div class="content">
+                                                               <div class="content flex-text-block">
                                                                        {{if .IsPrivate}}
-                                                                               {{svg "octicon-lock" 16 "tw-mr-1 iconFloat text gold"}}
+                                                                               {{svg "octicon-lock" 16 "text gold"}}
                                                                        {{else if .IsFork}}
-                                                                               {{svg "octicon-repo-forked" 16 "tw-mr-1 iconFloat"}}
+                                                                               {{svg "octicon-repo-forked"}}
                                                                        {{else if .IsMirror}}
-                                                                               {{svg "octicon-mirror" 16 "tw-mr-1 iconFloat"}}
+                                                                               {{svg "octicon-mirror"}}
                                                                        {{else if .IsTemplate}}
-                                                                               {{svg "octicon-repo-template" 16 "tw-mr-1 iconFloat"}}
+                                                                               {{svg "octicon-repo-template"}}
                                                                        {{else}}
-                                                                               {{svg "octicon-repo" 16 "tw-mr-1 iconFloat"}}
+                                                                               {{svg "octicon-repo"}}
                                                                        {{end}}
                                                                        <a class="name" href="{{.Link}}">{{.OwnerName}}/{{.Name}}</a>
                                                                        <span>{{FileSize .Size}}</span>
index af8a2f5adc66af605bf3370e456dd725bb1b2711..caabf1834cbb24d370aa7fe71b2a154021e10783 100644 (file)
   padding-bottom: 5px;
 }
 
-.user.settings .iconFloat {
-  float: left;
-}
-
 .user-orgs {
   display: flex;
   flex-flow: row wrap;