a89fc78eeb0d33e90008ae236811a8f93d882543
[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                 <a href="/user/{{.Account.ID}}" >
5                         <img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
6                 </a>
7                 <span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span>  
8                 <span class="icon dripicons-retweet retweeted"></span> 
9                 retweeted
10         </div>
11         {{template "status" .Reblog}}
12         {{else}}
13         {{block "status" .}}
14         <div class="status-container">
15                 <div>
16                         {{if not .HideAccountInfo}}
17                         <a href="/user/{{.Account.ID}}" >
18                                 <img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
19                         </a>
20                         {{end}}
21                 </div>
22                 <div class="status"> 
23                         {{if not .HideAccountInfo}}
24                         <div class="status-name">
25                                 <span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span> 
26                                 <a href="/user/{{.Account.ID}}" >
27                                         <span class="status-uname"> {{.Account.Acct}} </span>
28                                 </a>
29                                 <a class="status-visibility" href="{{.URL}}" target="_blank">
30                                         {{if eq .Visibility "public"}}
31                                         <span class="icon dripicons-web" title="Public"></span> 
32                                         {{else if eq .Visibility "unlisted"}}
33                                         <span class="icon dripicons-lock-open" title="Unlisted"></span> 
34                                         {{else if eq .Visibility "private"}}
35                                         <span class="icon dripicons-lock" title="Private"></span> 
36                                         {{else if eq .Visibility "direct"}}
37                                         <span class="icon dripicons-mail" title="Direct"></span> 
38                                         {{end}}
39                                 </a>
40                         </div>
41                         {{end}}
42                         <div class="status-reply-container">
43                                 {{if .InReplyToID}}
44                                 <span class="icon dripicons-forward"></span> 
45                                 <a class="status-reply-to" href="{{if not .ShowReplies}}/thread/{{.InReplyToID}}{{end}}#status-{{.InReplyToID}}"> reply to {{.Pleroma.InReplyToAccountAcct}} </a>
46                                 {{if index .ReplyMap .ID}} <span class="status-reply-info-divider"> - </span> {{end}}
47                                 {{end}}
48                                 {{if .ShowReplies}}
49                                 {{if index .ReplyMap .ID}} <span class="status-reply-text"> replies: </span> {{end}}
50                                 {{range index .ReplyMap .ID}}
51                                 <a class="status-reply" href="#status-{{.ID}}">#{{.Number}}</a>
52                                 {{end}}
53                                 {{end}}
54                         </div>
55                         <div class="status-content"> {{StatusContentFilter .SpoilerText .Content .Emojis .Mentions}} </div>
56                         <div class="status-media-container">
57                         {{range .MediaAttachments}}
58                         {{if eq .Type "image"}}
59                         <a href="{{.URL}}" target="_blank">
60                                 <img class="status-image" src="{{.URL}}" alt="status-image" />
61                         </a>
62                         {{else if eq .Type "audio"}}
63                         <audio class="status-audio" controls preload="none">
64                                 <source src="{{.URL}}">
65                                 <p> Your browser doesn't support HTML5 audio </p>
66                         </audio>
67                         {{else if eq .Type "video"}}
68                         <video class="status-video" controls preload="none">
69                                 <source src="{{.URL}}">
70                                 <p> Your browser doesn't support HTML5 video </p>
71                         </video>
72                         {{else}}
73                         <a href="{{.URL}}" target="_blank"> attachment </a>
74                         {{end}}
75                         {{end}}
76                         </div>
77                         <div class="status-action"> 
78                                 <a class="status-you" href="/thread/{{.ID}}?reply=true#status-{{.ID}}" title="reply"> 
79                                         <span class="icon dripicons-reply"></span> 
80                                         <span> {{DisplayInteractionCount .RepliesCount}} </span>
81                                 </a>
82                                 {{if or (eq .Visibility "private") (eq .Visibility "direct")}}
83                                 <a class="status-retweet" title="this status cannot be retweeted"> 
84                                         <span class="icon dripicons-retweet"></span> 
85                                         <span> {{DisplayInteractionCount .ReblogsCount}} </span>
86                                 </a>
87                                 {{else}}
88                                         {{if .Reblogged}}
89                                         <a class="status-retweet" href="/unretweet/{{.ID}}" title="undo retweet"> 
90                                                 <span class="icon dripicons-retweet retweeted"></span> 
91                                                 <span> {{DisplayInteractionCount .ReblogsCount}} </span>
92                                         </a>
93                                         {{else}}
94                                         <a class="status-retweet" href="/retweet/{{.ID}}" title="retweet"> 
95                                                 <span class="icon dripicons-retweet"></span> 
96                                                 <span> {{DisplayInteractionCount .ReblogsCount}} </span>
97                                         </a>
98                                         {{end}}
99                                 {{end}}
100                                 {{if .Favourited}}
101                                 <a class="status-like" href="/unlike/{{.ID}}" title="unlike"> 
102                                         <span class="icon dripicons-star liked"></span> 
103                                         <span> {{DisplayInteractionCount .FavouritesCount}} </span>
104                                 </a>
105                                 {{else}}
106                                 <a class="status-like" href="/like/{{.ID}}" title="like"> 
107                                         <span class="icon dripicons-star"></span> 
108                                         <span> {{DisplayInteractionCount .FavouritesCount}} </span>
109                                 </a>
110                                 {{end}}
111                                 <a class="status-time" href="/thread/{{.ID}}#status-{{.ID}}"> 
112                                         <time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{.CreatedAt}}"> {{TimeSince .CreatedAt}} </time> 
113                                 </a>
114                         </div>
115                 </div>
116         </div>
117         {{end}}
118         {{end}}
119 </div>