Skip to content

Commit

Permalink
Add dedicated class for empty placeholders (#27788)
Browse files Browse the repository at this point in the history
Fixes: go-gitea/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: KN4CK3R <[email protected]>
  • Loading branch information
silverwind and KN4CK3R committed Oct 25, 2023
1 parent ab3f6c1 commit 05aa91e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion templates/package/shared/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</div>
{{else}}
{{if not .HasPackages}}
<div class="empty center">
<div class="empty-placeholder">
{{svg "octicon-package" 48}}
<h2>{{ctx.Locale.Tr "packages.empty"}}</h2>
{{if and .Repository .CanWritePackages}}
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/actions/runs_list.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="flex-list">
{{if eq (len .Runs) 0}}
<div class="empty center">
<div class="empty-placeholder">
{{svg "octicon-no-entry" 48}}
<h2>{{if $.IsFiltered}}{{ctx.Locale.Tr "actions.runs.no_results"}}{{else}}{{ctx.Locale.Tr "actions.runs.no_runs"}}{{end}}</h2>
</div>
Expand Down
10 changes: 6 additions & 4 deletions web_src/css/repo.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 05aa91e

Please sign in to comment.