2943847a14367fb1b881376fa7b73172aea2cf7f
[bloat] / templates / notification.tmpl
1 {{with .Data}}
2 {{template "header.tmpl" (WithContext .CommonData $.Ctx)}}
3 <div class="notification-title-container">
4         <div class="notification-title">
5                 Notifications
6                 {{if and (not $.Ctx.AntiDopamineMode) (gt .UnreadCount 0)}}
7                         ({{.UnreadCount }})
8                 {{end}}
9         </div>
10         <a class="notification-refresh" href="/notifications" target="_self">refresh</a>
11         {{if .ReadID}}
12         <form action="/notifications/read?max_id={{.ReadID}}" method="post" target="_self">
13                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
14                 <input type="submit" value="read" class="btn-link">
15         </form>
16         {{end}}
17 </div>
18
19 {{range .Notifications}}
20 <div class="notification-container {{if .Pleroma}}{{if not .Pleroma.IsSeen}}unread{{end}}{{end}}">
21         {{if eq .Type "follow"}}
22         <div>
23                 <div class="status-profile-img-container">
24                         <a class="img-link" href="/user/{{.Account.ID}}">
25                                 <img class="status-profile-img" src="{{.Account.AvatarStatic}}" title="{{.Account.Acct}}" alt="profile-avatar" height="48" />
26                         </a>
27                 </div>
28                 <div class="notification-follow">
29                         <div class="notification-info-text">
30                                 <span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span>  
31                                 <span> followed you </span>
32                                 <span>
33                                         - <time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{FormatTimeRFC822 .CreatedAt}}">{{TimeSince .CreatedAt}}</time> 
34                                 </span>
35                         </div>
36                         <div class="notification-follow-uname">
37                                 @{{.Account.Acct}}
38                         </div>
39                 </div>
40         </div>
41
42         {{else if eq .Type "mention"}}
43         {{template "status" (WithContext .Status $.Ctx)}}
44
45         {{else if eq .Type "reblog"}}
46         <div class="retweet-info">
47                 <a class="img-link" href="/user/{{.Account.ID}}">
48                         <img class="status-profile-img" src="{{.Account.AvatarStatic}}" title="{{.Account.Acct}}" alt="avatar" height="48" />
49                 </a>
50                 <span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span>  
51                 <span> retweeted your post </span>
52                 <span>
53                         - <time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{FormatTimeRFC822 .CreatedAt}}">{{TimeSince .CreatedAt}}</time> 
54                 </span>
55         </div>
56         {{template "status" (WithContext .Status $.Ctx)}}
57
58         {{else if eq .Type "favourite"}}
59         <div class="retweet-info">
60                 <a class="img-link" href="/user/{{.Account.ID}}">
61                         <img class="status-profile-img" src="{{.Account.AvatarStatic}}" title="{{.Account.Acct}}" alt="avatar" height="48" />
62                 </a>
63                 <span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span>  
64                 <span> liked your post </span>
65                 <span>
66                         - <time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{FormatTimeRFC822 .CreatedAt}}">{{TimeSince .CreatedAt}}</time> 
67                 </span>
68         </div>
69         {{template "status" (WithContext .Status $.Ctx)}}
70         {{end}}
71 </div>
72 {{end}}
73
74 <div class="pagination">
75         {{if .NextLink}}
76                 <a href="{{.NextLink}}" target="_self">next</a>
77         {{end}}
78 </div>
79
80 {{template "footer.tmpl"}}
81 {{end}}