Improve empty notifications display (#24668)

- Add icon and padding to empty notification list, center it
- Add icon to header
- Remove border below header

#### Before
<img width="1250" alt="Screenshot 2023-05-11 at 23 34 53"
src="https://github.com/go-gitea/gitea/assets/115237/7c1990a1-e48d-40e5-8762-462d8c3ac0ea">

#### After
			
<img width="1249" alt="Screenshot 2023-05-12 at 00 24 02"
src="https://github.com/go-gitea/gitea/assets/115237/e0bcdf81-8468-4047-b92c-6625f00a22aa">
This commit is contained in:
silverwind 2023-05-12 06:06:23 +02:00 committed by GitHub
parent 6c8b680f91
commit 8251b317f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 6 deletions

View File

@ -1,6 +1,9 @@
<div role="main" aria-label="{{.Title}}" class="page-content user notification" id="notification_div" data-params="{{.Page.GetParams}}" data-sequence-number="{{.SequenceNumber}}"> <div role="main" aria-label="{{.Title}}" class="page-content user notification" id="notification_div" data-params="{{.Page.GetParams}}" data-sequence-number="{{.SequenceNumber}}">
<div class="ui container"> <div class="ui container">
<h1 class="ui dividing header">{{.locale.Tr "notification.notifications"}}</h1> <h1 class="ui header gt-df gt-ac">
{{svg "octicon-bell" 28 "gt-mr-3 gt-mt-1"}}
{{.locale.Tr "notification.notifications"}}
</h1>
<div class="ui top attached tabular menu"> <div class="ui top attached tabular menu">
{{$notificationUnreadCount := call .NotificationUnreadCount}} {{$notificationUnreadCount := call .NotificationUnreadCount}}
<a href="{{AppSubUrl}}/notifications?q=unread" class="{{if eq .Status 1}}active {{end}}item"> <a href="{{AppSubUrl}}/notifications?q=unread" class="{{if eq .Status 1}}active {{end}}item">
@ -23,11 +26,14 @@
</div> </div>
<div class="ui bottom attached active tab segment gt-p-3"> <div class="ui bottom attached active tab segment gt-p-3">
{{if eq (len .Notifications) 0}} {{if eq (len .Notifications) 0}}
{{if eq .Status 1}} <div class="gt-df gt-ac gt-fc gt-p-4">
{{.locale.Tr "notification.no_unread"}} {{svg "octicon-inbox" 56 "gt-mb-4"}}
{{else}} {{if eq .Status 1}}
{{.locale.Tr "notification.no_read"}} {{.locale.Tr "notification.no_unread"}}
{{end}} {{else}}
{{.locale.Tr "notification.no_read"}}
{{end}}
</div>
{{else}} {{else}}
<table class="ui unstackable very compact small table" id="notification_table"> <table class="ui unstackable very compact small table" id="notification_table">
<tbody> <tbody>