Fix css and template issues
[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 class="img-link" 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                 {{if not .HideAccountInfo}}
16                 <div class="status-profile-img-container">
17                         <a class="img-link" href="/user/{{.Account.ID}}">
18                                 <img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
19                         </a>
20                 </div>
21                 {{end}}
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">
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                                 <a class="remote-link" href="{{.URL}}" target="_blank" title="source">
41                                         <span class="icon dripicons-link"></span> 
42                                 </a>
43                         </div>
44                         {{end}}
45                         <div class="status-reply-container">
46                                 {{if .InReplyToID}}
47                                 <span class="icon dripicons-forward"></span> 
48                                 <a class="status-reply-to" href="{{if not .ShowReplies}}/thread/{{.InReplyToID}}{{end}}#status-{{.InReplyToID}}"> reply to {{.Pleroma.InReplyToAccountAcct}} </a>
49                                 {{if index .ReplyMap .ID}} <span class="status-reply-info-divider"> - </span> {{end}}
50                                 {{end}}
51                                 {{if .ShowReplies}}
52                                 {{if index .ReplyMap .ID}} <span class="status-reply-text"> replies: </span> {{end}}
53                                 {{range index .ReplyMap .ID}}
54                                 <a class="status-reply" href="#status-{{.ID}}">#{{.Number}}</a>
55                                 {{end}}
56                                 {{end}}
57                         </div>
58                         <div class="status-content"> {{StatusContentFilter .SpoilerText .Content .Emojis .Mentions}} </div>
59                         <div class="status-media-container">
60                         {{range .MediaAttachments}}
61                         {{if eq .Type "image"}}
62                         <a class="img-link" href="{{.URL}}" target="_blank">
63                                 <img class="status-image" src="{{.URL}}" alt="status-image" />
64                         </a>
65                         {{else if eq .Type "audio"}}
66                         <audio class="status-audio" controls preload="none">
67                                 <source src="{{.URL}}">
68                                 <p> Your browser doesn't support HTML5 audio </p>
69                         </audio>
70                         {{else if eq .Type "video"}}
71                         <video class="status-video" controls preload="none">
72                                 <source src="{{.URL}}">
73                                 <p> Your browser doesn't support HTML5 video </p>
74                         </video>
75                         {{else}}
76                         <a href="{{.URL}}" target="_blank"> attachment </a>
77                         {{end}}
78                         {{end}}
79                         </div>
80                         <div class="status-action"> 
81                                 <a class="status-you" href="/thread/{{.ID}}?reply=true#status-{{.ID}}" title="reply"> 
82                                         <span class="icon dripicons-reply"></span> 
83                                         <span> {{DisplayInteractionCount .RepliesCount}} </span>
84                                 </a>
85                                 {{if or (eq .Visibility "private") (eq .Visibility "direct")}}
86                                 <a class="status-retweet" title="this status cannot be retweeted"> 
87                                         <span class="icon dripicons-retweet"></span> 
88                                         <span> {{DisplayInteractionCount .ReblogsCount}} </span>
89                                 </a>
90                                 {{else}}
91                                         {{if .Reblogged}}
92                                         <a class="status-retweet" href="/unretweet/{{.ID}}" title="undo retweet"> 
93                                                 <span class="icon dripicons-retweet retweeted"></span> 
94                                                 <span> {{DisplayInteractionCount .ReblogsCount}} </span>
95                                         </a>
96                                         {{else}}
97                                         <a class="status-retweet" href="/retweet/{{.ID}}" title="retweet"> 
98                                                 <span class="icon dripicons-retweet"></span> 
99                                                 <span> {{DisplayInteractionCount .ReblogsCount}} </span>
100                                         </a>
101                                         {{end}}
102                                 {{end}}
103                                 {{if .Favourited}}
104                                 <a class="status-like" href="/unlike/{{.ID}}" title="unlike"> 
105                                         <span class="icon dripicons-star liked"></span> 
106                                         <span> {{DisplayInteractionCount .FavouritesCount}} </span>
107                                 </a>
108                                 {{else}}
109                                 <a class="status-like" href="/like/{{.ID}}" title="like"> 
110                                         <span class="icon dripicons-star"></span> 
111                                         <span> {{DisplayInteractionCount .FavouritesCount}} </span>
112                                 </a>
113                                 {{end}}
114                                 <a class="status-time" href="/thread/{{.ID}}#status-{{.ID}}"> 
115                                         <time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{.CreatedAt}}"> {{TimeSince .CreatedAt}} </time> 
116                                 </a>
117                         </div>
118                 </div>
119         </div>
120         {{end}}
121         {{end}}
122 </div>