From 05aa91e6da54e0e8abd18d8dd2b5a29249c636ed Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 25 Oct 2023 23:42:14 +0200 Subject: [PATCH] Add dedicated class for empty placeholders (#27788) 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: 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 5b532aa495..b17917c246 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 {