From 75e0bdcec582409d6c49f9e443918981b19531ea Mon Sep 17 00:00:00 2001 From: Giteabot Date: Fri, 7 Jun 2024 12:37:47 +0800 Subject: [PATCH] Optimize repo-list layout to enhance visual experience (#31272) (#31276) 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 Co-authored-by: wxiaoguang --- templates/user/settings/repos.tmpl | 12 ++++++------ web_src/css/user.css | 4 ---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/templates/user/settings/repos.tmpl b/templates/user/settings/repos.tmpl index 26b9dfeed9..a50fb586c7 100644 --- a/templates/user/settings/repos.tmpl +++ b/templates/user/settings/repos.tmpl @@ -84,17 +84,17 @@
{{range .Repos}}
-
+
{{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}} {{.OwnerName}}/{{.Name}} {{FileSize .Size}} diff --git a/web_src/css/user.css b/web_src/css/user.css index af8a2f5adc..caabf1834c 100644 --- a/web_src/css/user.css +++ b/web_src/css/user.css @@ -77,10 +77,6 @@ padding-bottom: 5px; } -.user.settings .iconFloat { - float: left; -} - .user-orgs { display: flex; flex-flow: row wrap;