Skip to content

Commit 487c573

Browse files
GiteaBotsilverwindKN4CK3R
authored
Add dedicated class for empty placeholders (go-gitea#27788) (go-gitea#27792)
Backport go-gitea#27788 by @silverwind Fixes: go-gitea#27784 <img width="1033" alt="Screenshot 2023-10-25 at 19 07 15" src="https://github.com/go-gitea/gitea/assets/115237/1a363851-1a86-48cb-99ec-0a573371bb6e"> <img width="1051" alt="Screenshot 2023-10-25 at 19 07 41" src="https://github.com/go-gitea/gitea/assets/115237/add4b606-2264-430a-af35-249ef005817f"> Co-authored-by: silverwind <[email protected]> Co-authored-by: KN4CK3R <[email protected]>
1 parent 25acbfe commit 487c573

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

templates/package/shared/list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</div>
3939
{{else}}
4040
{{if not .HasPackages}}
41-
<div class="empty center">
41+
<div class="empty-placeholder">
4242
{{svg "octicon-package" 48}}
4343
<h2>{{ctx.Locale.Tr "packages.empty"}}</h2>
4444
{{if and .Repository .CanWritePackages}}

templates/repo/actions/runs_list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="flex-list">
22
{{if eq (len .Runs) 0}}
3-
<div class="empty center">
3+
<div class="empty-placeholder">
44
{{svg "octicon-no-entry" 48}}
55
<h2>{{if $.IsFiltered}}{{ctx.Locale.Tr "actions.runs.no_results"}}{{else}}{{ctx.Locale.Tr "actions.runs.no_runs"}}{{end}}</h2>
66
</div>

web_src/css/repo.css

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1798,10 +1798,12 @@
17981798
flex: 1
17991799
}
18001800

1801-
.repository.packages .empty,
1802-
.repository.actions .empty {
1803-
padding-top: 70px;
1804-
padding-bottom: 100px;
1801+
.empty-placeholder {
1802+
display: flex;
1803+
flex-direction: column;
1804+
align-items: center;
1805+
padding-top: 40px;
1806+
padding-bottom: 40px;
18051807
}
18061808

18071809
.repository.packages .file-size {

0 commit comments

Comments
 (0)