Use local url for for mentioned users
[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                         </div>
30                         {{end}}
31                         <div class="status-reply-container">
32                                 {{if .InReplyToID}}
33                                 <span class="icon dripicons-forward"></span> 
34                                 <a class="status-reply-to" href="{{if not .ShowReplies}}/thread/{{.InReplyToID}}{{end}}#status-{{.InReplyToID}}"> reply to {{.Pleroma.InReplyToAccountAcct}} </a>
35                                 {{if index .ReplyMap .ID}} <span class="status-reply-info-divider"> - </span> {{end}}
36                                 {{end}}
37                                 {{if .ShowReplies}}
38                                 {{if index .ReplyMap .ID}} <span class="status-reply-text"> replies: </span> {{end}}
39                                 {{range index .ReplyMap .ID}}
40                                 <a class="status-reply" href="#status-{{.ID}}">#{{.Number}}</a>
41                                 {{end}}
42                                 {{end}}
43                         </div>
44                         <div class="status-content"> {{StatusContentFilter .Content .Emojis .Mentions}} </div>
45                         <div class="status-media-container">
46                         {{range .MediaAttachments}}
47                         {{if eq .Type "image"}}
48                         <a href="{{.URL}}" target="_blank">
49                                 <img class="status-image" src="{{.URL}}" alt="status-image" />
50                         </a>
51                         {{else if eq .Type "audio"}}
52                         <audio class="status-audio" controls preload="none">
53                                 <source src="{{.URL}}">
54                                 <p> Your browser doesn't support HTML5 audio </p>
55                         </audio>
56                         {{else if eq .Type "video"}}
57                         <video class="status-video" controls preload="none">
58                                 <source src="{{.URL}}">
59                                 <p> Your browser doesn't support HTML5 video </p>
60                         </video>
61                         {{else}}
62                         <a href="{{.URL}}" target="_blank"> attachment </a>
63                         {{end}}
64                         {{end}}
65                         </div>
66                         <div class="status-action"> 
67                                 <a class="status-you" href="/thread/{{.ID}}?reply=true#status-{{.ID}}" title="reply"> 
68                                         <span class="icon dripicons-reply"></span> 
69                                         <span> {{DisplayInteractionCount .RepliesCount}} </span>
70                                 </a>
71                                 {{if .Reblogged}}
72                                 <a class="status-retweet" href="/unretweet/{{.ID}}" title="undo repost"> 
73                                         <span class="icon dripicons-retweet retweeted"></span> 
74                                         <span> {{DisplayInteractionCount .ReblogsCount}} </span>
75                                 </a>
76                                 {{else}}
77                                 <a class="status-retweet" href="/retweet/{{.ID}}" title="repost"> 
78                                         <span class="icon dripicons-retweet"></span> 
79                                         <span> {{DisplayInteractionCount .ReblogsCount}} </span>
80                                 </a>
81                                 {{end}}
82                                 {{if .Favourited}}
83                                 <a class="status-like" href="/unlike/{{.ID}}" title="unlike"> 
84                                         <span class="icon dripicons-star liked"></span> 
85                                         <span> {{DisplayInteractionCount .FavouritesCount}} </span>
86                                 </a>
87                                 {{else}}
88                                 <a class="status-like" href="/like/{{.ID}}" title="like"> 
89                                         <span class="icon dripicons-star"></span> 
90                                         <span> {{DisplayInteractionCount .FavouritesCount}} </span>
91                                 </a>
92                                 {{end}}
93                                 <a class="status-time" href="/thread/{{.ID}}#status-{{.ID}}"> 
94                                         <time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{.CreatedAt}}"> {{TimeSince .CreatedAt}} </time> 
95                                 </a>
96                         </div>
97                 </div>
98         </div>
99         {{end}}
100         {{end}}
101 </div>