Optimize repo-list layout to enhance visual experience (#31272)

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: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
Kerwin Bryant 2024-06-07 07:22:03 +08:00 committed by GitHub
parent da4bbc4247
commit 8e33746746
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 10 deletions

View File

@ -84,17 +84,17 @@
<div class="ui middle aligned divided list"> <div class="ui middle aligned divided list">
{{range .Repos}} {{range .Repos}}
<div class="item"> <div class="item">
<div class="content"> <div class="content flex-text-block">
{{if .IsPrivate}} {{if .IsPrivate}}
{{svg "octicon-lock" 16 "tw-mr-1 iconFloat text gold"}} {{svg "octicon-lock" 16 "text gold"}}
{{else if .IsFork}} {{else if .IsFork}}
{{svg "octicon-repo-forked" 16 "tw-mr-1 iconFloat"}} {{svg "octicon-repo-forked"}}
{{else if .IsMirror}} {{else if .IsMirror}}
{{svg "octicon-mirror" 16 "tw-mr-1 iconFloat"}} {{svg "octicon-mirror"}}
{{else if .IsTemplate}} {{else if .IsTemplate}}
{{svg "octicon-repo-template" 16 "tw-mr-1 iconFloat"}} {{svg "octicon-repo-template"}}
{{else}} {{else}}
{{svg "octicon-repo" 16 "tw-mr-1 iconFloat"}} {{svg "octicon-repo"}}
{{end}} {{end}}
<a class="name" href="{{.Link}}">{{.OwnerName}}/{{.Name}}</a> <a class="name" href="{{.Link}}">{{.OwnerName}}/{{.Name}}</a>
<span>{{FileSize .Size}}</span> <span>{{FileSize .Size}}</span>

View File

@ -77,10 +77,6 @@
padding-bottom: 5px; padding-bottom: 5px;
} }
.user.settings .iconFloat {
float: left;
}
.user-orgs { .user-orgs {
display: flex; display: flex;
flex-flow: row wrap; flex-flow: row wrap;