From 487c573c28935a9a54f609321ac75f7770c4895b Mon Sep 17 00:00:00 2001 From: Giteabot Date: Thu, 26 Oct 2023 15:26:05 +0800 Subject: [PATCH] Add dedicated class for empty placeholders (#27788) (#27792) Backport #27788 by @silverwind Fixes: https://github.com/go-gitea/gitea/issues/27784 Screenshot 2023-10-25 at 19 07 15 Screenshot 2023-10-25 at 19 07 41 Co-authored-by: silverwind Co-authored-by: KN4CK3R --- templates/package/shared/list.tmpl | 2 +- templates/repo/actions/runs_list.tmpl | 2 +- web_src/css/repo.css | 10 ++++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/templates/package/shared/list.tmpl b/templates/package/shared/list.tmpl index af79490f4d..a572d98bb6 100644 --- a/templates/package/shared/list.tmpl +++ b/templates/package/shared/list.tmpl @@ -38,7 +38,7 @@ {{else}} {{if not .HasPackages}} -
+
{{svg "octicon-package" 48}}

{{ctx.Locale.Tr "packages.empty"}}

{{if and .Repository .CanWritePackages}} diff --git a/templates/repo/actions/runs_list.tmpl b/templates/repo/actions/runs_list.tmpl index 37b19f0bdc..b3469a2edc 100644 --- a/templates/repo/actions/runs_list.tmpl +++ b/templates/repo/actions/runs_list.tmpl @@ -1,6 +1,6 @@
{{if eq (len .Runs) 0}} -
+
{{svg "octicon-no-entry" 48}}

{{if $.IsFiltered}}{{ctx.Locale.Tr "actions.runs.no_results"}}{{else}}{{ctx.Locale.Tr "actions.runs.no_runs"}}{{end}}

diff --git a/web_src/css/repo.css b/web_src/css/repo.css index db8cd9e687..b39f2f4fbe 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -1798,10 +1798,12 @@ flex: 1 } -.repository.packages .empty, -.repository.actions .empty { - padding-top: 70px; - padding-bottom: 100px; +.empty-placeholder { + display: flex; + flex-direction: column; + align-items: center; + padding-top: 40px; + padding-bottom: 40px; } .repository.packages .file-size {