Add notification support
[bloat] / templates / status.tmpl
1 <div id="status-{{if .Reblog}}{{.Reblog.ID}}{{else}}{{.ID}}{{end}}" class="status-container-container">
2         {{if .Reblog}}
3         <div class="retweet-info">
4                 <img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
5                 <span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>  
6                 <span class="icon dripicons-retweet retweeted"></span> 
7                 retweeted
8         </div>
9         {{template "status" .Reblog}}
10         {{else}}
11         {{block "status" .}}
12         <div class="status-container">
13                 <div>
14                         {{if ne .Account.ID ""}}
15                         <img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
16                         {{end}}
17                 </div>
18                 <div class="status"> 
19                         {{if ne .Account.ID ""}}
20                         <div class="status-name">
21                                 <span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span> 
22                                 <span class="status-uname"> {{.Account.Acct}} </span>
23                         </div>
24                         {{end}}
25                         <div class="status-content"> {{WithEmojis .Content .Emojis}} </div>
26                         <div class="status-media-container">
27                         {{range .MediaAttachments}}
28                         {{if eq .Type "image"}}
29                         <a href="{{.URL}}" target="_blank">
30                                 <img class="status-image" src="{{.URL}}" alt="status-image" />
31                         </a>
32                         {{else if eq .Type "audio"}}
33                         <audio class="status-audio" controls preload="none">
34                                 <source src="{{.URL}}">
35                                 <p> Your browser doesn't support HTML5 audio </p>
36                         </audio>
37                         {{else if eq .Type "video"}}
38                         <video class="status-video" controls preload="none">
39                                 <source src="{{.URL}}">
40                                 <p> Your browser doesn't support HTML5 video </p>
41                         </video>
42                         {{else}}
43                         <a href="{{.URL}}" target="_blank"> attachment </a>
44                         {{end}}
45                         {{end}}
46                         </div>
47                         <div class="status-action"> 
48                                 <a class="status-you" href="/thread/{{.ID}}?reply=true#status-{{.ID}}" title="reply"> 
49                                         <span class="icon dripicons-reply"></span> 
50                                         <span> {{DisplayInteractionCount .RepliesCount}} </span>
51                                 </a>
52                                 {{if .Reblogged}}
53                                 <a class="status-retweet" href="/unretweet/{{.ID}}" title="undo repost"> 
54                                         <span class="icon dripicons-retweet retweeted"></span> 
55                                         <span> {{DisplayInteractionCount .ReblogsCount}} </span>
56                                 </a>
57                                 {{else}}
58                                 <a class="status-retweet" href="/retweet/{{.ID}}" title="repost"> 
59                                         <span class="icon dripicons-retweet"></span> 
60                                         <span> {{DisplayInteractionCount .ReblogsCount}} </span>
61                                 </a>
62                                 {{end}}
63                                 {{if .Favourited}}
64                                 <a class="status-like" href="/unlike/{{.ID}}" title="unlike"> 
65                                         <span class="icon dripicons-star liked"></span> 
66                                         <span> {{DisplayInteractionCount .FavouritesCount}} </span>
67                                 </a>
68                                 {{else}}
69                                 <a class="status-like" href="/like/{{.ID}}" title="like"> 
70                                         <span class="icon dripicons-star"></span> 
71                                         <span> {{DisplayInteractionCount .FavouritesCount}} </span>
72                                 </a>
73                                 {{end}}
74                                 <a class="status-time" href="/thread/{{.ID}}#status-{{.ID}}"> 
75                                         <time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{.CreatedAt}}"> {{TimeSince .CreatedAt}} </time> 
76                                 </a>
77                         </div>
78                 </div>
79         </div>
80         {{end}}
81         {{end}}
82 </div>