Use '@' prefix for all usernames
[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>
37                                 <a href="/user/{{.Account.ID}}"> <span class="status-uname"> @{{.Account.Acct}} </span> </a>
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                 <a href="/user/{{.Account.ID}}">
51                         <span class="status-uname"> @{{.Account.Acct}} </span>
52                 </a>
53                 <span> retweeted your post </span>
54                 <span>
55                         - <time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{FormatTimeRFC822 .CreatedAt}}">{{TimeSince .CreatedAt}}</time> 
56                 </span>
57         </div>
58         {{template "status" (WithContext .Status $.Ctx)}}
59
60         {{else if eq .Type "favourite"}}
61         <div class="retweet-info">
62                 <a class="img-link" href="/user/{{.Account.ID}}">
63                         <img class="status-profile-img" src="{{.Account.AvatarStatic}}" title="@{{.Account.Acct}}" alt="avatar" height="48" />
64                 </a>
65                 <a href="/user/{{.Account.ID}}">
66                         <span class="status-uname"> @{{.Account.Acct}} </span>
67                 </a>
68                 <span> liked your post </span>
69                 <span>
70                         - <time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{FormatTimeRFC822 .CreatedAt}}">{{TimeSince .CreatedAt}}</time> 
71                 </span>
72         </div>
73         {{template "status" (WithContext .Status $.Ctx)}}
74         {{end}}
75 </div>
76 {{end}}
77
78 <div class="pagination">
79         {{if .NextLink}}
80                 <a href="{{.NextLink}}" target="_self">next</a>
81         {{end}}
82 </div>
83
84 {{template "footer.tmpl"}}
85 {{end}}