Skip to content

Commit 8251b31

Browse files
authored
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">
1 parent 6c8b680 commit 8251b31

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

templates/user/notification/notification_div.tmpl

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<div role="main" aria-label="{{.Title}}" class="page-content user notification" id="notification_div" data-params="{{.Page.GetParams}}" data-sequence-number="{{.SequenceNumber}}">
22
<div class="ui container">
3-
<h1 class="ui dividing header">{{.locale.Tr "notification.notifications"}}</h1>
3+
<h1 class="ui header gt-df gt-ac">
4+
{{svg "octicon-bell" 28 "gt-mr-3 gt-mt-1"}}
5+
{{.locale.Tr "notification.notifications"}}
6+
</h1>
47
<div class="ui top attached tabular menu">
58
{{$notificationUnreadCount := call .NotificationUnreadCount}}
69
<a href="{{AppSubUrl}}/notifications?q=unread" class="{{if eq .Status 1}}active {{end}}item">
@@ -23,11 +26,14 @@
2326
</div>
2427
<div class="ui bottom attached active tab segment gt-p-3">
2528
{{if eq (len .Notifications) 0}}
26-
{{if eq .Status 1}}
27-
{{.locale.Tr "notification.no_unread"}}
28-
{{else}}
29-
{{.locale.Tr "notification.no_read"}}
30-
{{end}}
29+
<div class="gt-df gt-ac gt-fc gt-p-4">
30+
{{svg "octicon-inbox" 56 "gt-mb-4"}}
31+
{{if eq .Status 1}}
32+
{{.locale.Tr "notification.no_unread"}}
33+
{{else}}
34+
{{.locale.Tr "notification.no_read"}}
35+
{{end}}
36+
</div>
3137
{{else}}
3238
<table class="ui unstackable very compact small table" id="notification_table">
3339
<tbody>

0 commit comments

Comments
 (0)