aboutsummaryrefslogtreecommitdiff
path: root/templates/notification.tmpl
blob: 02b38472bf1a1df8969871cdf7015a3f598df3fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{{with .Data}}
{{template "header.tmpl" (WithContext .CommonData $.Ctx)}}
<div class="notification-title-container">
	<div class="notification-title">
		Notifications
		{{if gt .UnreadCount 0}}({{.UnreadCount }}){{end}}
	</div>
	<a class="notification-refresh" href="/notifications" target="_self">refresh</a>
	{{if .ReadID}}
	<form action="/notifications/read?max_id={{.ReadID}}" method="post" target="_self">
		<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
		<input type="submit" value="read" class="btn-link">
	</form>
	{{end}}
</div>

{{range .Notifications}}
<div class="notification-container {{if .Pleroma}}{{if not .Pleroma.IsSeen}}unread{{end}}{{end}}">
	{{if eq .Type "follow"}}
	<div class="notification-follow-container">
		<div class="status-profile-img-container">
			<a class="img-link" href="/user/{{.Account.ID}}">
				<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
			</a>
		</div>
		<div>
			<div class="notification-info-text">
				<span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span>  
				<span> followed you </span>
				<span>
					- <time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{FormatTimeRFC822 .CreatedAt}}">{{TimeSince .CreatedAt}}</time> 
				</span>
			</div>
			<div class="notification-follow-uname">
				@{{.Account.Acct}}
			</div>
		</div>
	</div>

	{{else if eq .Type "mention"}}
	{{template "status" (WithContext .Status $.Ctx)}}

	{{else if eq .Type "reblog"}}
	<div class="retweet-info">
		<a class="img-link" href="/user/{{.Account.ID}}">
			<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="avatar" />
		</a>
		<span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span>  
		<span> retweeted your post </span>
		<span>
			- <time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{FormatTimeRFC822 .CreatedAt}}">{{TimeSince .CreatedAt}}</time> 
		</span>
	</div>
	{{template "status" (WithContext .Status $.Ctx)}}

	{{else if eq .Type "favourite"}}
	<div class="retweet-info">
		<a class="img-link" href="/user/{{.Account.ID}}">
			<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="avatar" />
		</a>
		<span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span>  
		<span> liked your post </span>
		<span>
			- <time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{FormatTimeRFC822 .CreatedAt}}">{{TimeSince .CreatedAt}}</time> 
		</span>
	</div>
	{{template "status" (WithContext .Status $.Ctx)}}
	{{end}}
</div>
{{end}}

<div class="pagination">
	{{if .NextLink}}
		<a href="{{.NextLink}}" target="_self">next</a>
	{{end}}
</div>

{{template "footer.tmpl"}}
{{end}}