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