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