~jadedctrl/jam-xwx-moe

~jadedctrl/jam-xwx-moe/bloat-fe/instance/ŝablonoj/status.tmpl
 ..
0 {{with .Data}}
1 <div id="status-{{.ID}}" 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.Avatar}}" title="@{{.Account.Acct}}" alt="avatar" height="24" />
6 </a>
7 <bdi class="status-dname"> {{EmojiFilter (HTML .Account.DisplayName) .Account.Emojis | Raw}} </bdi>
8 <a href="/user/{{.Account.ID}}">
9 <span class="status-uname"> @{{.Account.Acct}} </span>
10 </a>
11 ripetiĝis
12 </div>
13 {{template "status" (WithContext .Reblog $.Ctx)}}
14 {{else}}
15 {{block "status" (WithContext . $.Ctx)}}
16 {{with $s := .Data}}
17 <div class="status-container status-{{.ID}}" data-id="{{.ID}}">
18 <div class="status-profile-img-container">
19 <a class="img-link" href="/user/{{.Account.ID}}">
20 <img class="status-profile-img" src="{{.Account.Avatar}}" title="@{{.Account.Acct}}" alt="avatar" height="48" />
21 </a>
22 </div>
23 <div class="status">
24 <div class="status-name">
25 <bdi class="status-dname"> {{EmojiFilter (HTML .Account.DisplayName) .Account.Emojis | Raw}} </bdi>
26 <a href="/user/{{.Account.ID}}">
27 <span class="status-uname"> @{{.Account.Acct}} </span>
28 </a>
29 <div class="more-container">
30 <div class="remote-link">
31 {{if .IDNumbers}}#{{index .IDNumbers .ID}}{{end}} {{.Visibility}}
32 </div>
33 <div class="more-content">
34 <a class="more-link" href="{{.URL}}" target="_blank">
35 fonto
36 </a>
37 <a class="more-link" href="/quickreply/{{.ID}}#status-{{.ID}}">
38 rapide respondi
39 </a>
40 {{if .Muted}}
41 <form action="/unmuteconv/{{.ID}}" method="post" target="_self">
42 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
43 <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
44 <input type="submit" value="malsilentigi" class="btn-link more-link">
45 </form>
46 {{else}}
47 <form action="/muteconv/{{.ID}}" method="post" target="_self">
48 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
49 <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
50 <input type="submit" value="silentigi" class="btn-link more-link">
51 </form>
52 {{end}}
53 {{if .Bookmarked}}
54 <form action="/unbookmark/{{.ID}}" method="post" target="_self">
55 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
56 <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
57 <input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}">
58 <input type="submit" value="senlegosigni" class="btn-link more-link">
59 </form>
60 {{else}}
61 <form action="/bookmark/{{.ID}}" method="post" target="_self">
62 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
63 <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
64 <input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}">
65 <input type="submit" value="legosigni" class="btn-link more-link">
66 </form>
67 {{end}}
68 {{if eq $.Ctx.UserID .Account.ID}}
69 <form action="/delete/{{.ID}}" method="post" target="_self">
70 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
71 <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
72 <input type="submit" value="forigi" class="btn-link more-link">
73 </form>
74 {{end}}
75 </div>
76 </div>
77 </div>
78 <div class="status-reply-container">
79 {{if .InReplyToID}}
80 <a class="status-reply-to-link" href="{{if not .ShowReplies}}/thread/{{.InReplyToID}}{{end}}#status-{{.InReplyToID}}">
81 responde al {{if .IDNumbers}}#{{index .IDNumbers .InReplyToID}}{{end}} {{if .Pleroma.InReplyToAccountAcct}}@{{.Pleroma.InReplyToAccountAcct}}{{else if not .IDNumbers}}{{.InReplyToID}}{{end}}
82 </a>
83 {{if index .IDReplies .ID}} <span class="status-reply-info-divider"> - </span> {{end}}
84 {{end}}
85 {{if .ShowReplies}}
86 {{if index .IDReplies .ID}} <span class="status-reply-text"> respondoj: </span> {{end}}
87 {{range index .IDReplies .ID}}
88 <a class="status-reply-link" href="#status-{{.ID}}">#{{.Number}}</a>
89 {{end}}
90 {{end}}
91 </div>
92 {{if (or .Content .SpoilerText)}}
93 <div class="status-content">
94 {{if .SpoilerText}}{{EmojiFilter (HTML .SpoilerText) .Emojis | Raw}}<br/>{{end}}
95 {{StatusContentFilter .Content .Emojis .Mentions | Raw}}
96 </div>
97 {{end}}
98 {{if .MediaAttachments}}
99 <div class="status-media-container">
100 {{range .MediaAttachments}}
101
102 {{if eq .Type "image"}}
103 {{if $.Ctx.HideAttachments}}
104 <a href="{{.URL}}" target="_blank">
105 [image{{if $s.Sensitive}}/nsfw{{end}}{{if .Description}}: {{.Description}}{{end}}]
106 </a>
107 {{else}}
108 <a class="img-link" href="{{.URL}}" target="_blank" title="{{.Description}}">
109 <img class="status-image" src="{{.PreviewURL}}" alt="status-image" height="240" />
110 {{if (and $.Ctx.MaskNSFW $s.Sensitive)}}
111 <img src="https://jam.xwx.moe/static/bildoj/konsterna.jpg" class="status-nsfw-overlay"/>
112 {{end}}
113 </a>
114 {{end}}
115
116 {{else if eq .Type "audio"}}
117 {{if $.Ctx.HideAttachments}}
118 <a href="{{.URL}}" target="_blank">
119 [audio{{if $s.Sensitive}}/nsfw{{end}}{{if .Description}}: {{.Description}}{{end}}]
120 </a>
121 {{else}}
122 <audio class="status-audio" controls title="{{.Description}}">
123 <source src="{{.URL}}">
124 <a href="{{.URL}}" target="_blank"> [audio] </a>
125 </audio>
126 {{end}}
127
128 {{else if eq .Type "video"}}
129 {{if $.Ctx.HideAttachments}}
130 <a href="{{.URL}}" target="_blank">
131 [video{{if $s.Sensitive}}/nsfw{{end}}{{if .Description}}: {{.Description}}{{end}}]
132 </a>
133 {{else}}
134 <div class="status-video-container" title="{{.Description}}">
135 <video class="status-video" controls height="240">
136 <source src="{{.URL}}">
137 <a href="{{.URL}}" target="_blank"> [video] </a>
138 </video>
139 {{if (and $.Ctx.MaskNSFW $s.Sensitive)}}
140 <img src="https://jam.xwx.moe/static/bildoj/konsterna.jpg" class="status-nsfw-overlay"/>
141 {{end}}
142 </div>
143 {{end}}
144
145 {{else}}
146 <a href="{{.URL}}" target="_blank">
147 [attachment{{if $s.Sensitive}}/nsfw{{end}}{{if .Description}}: {{.Description}}{{end}}]
148 </a>
149 {{end}}
150 {{end}}
151 </div>
152 {{end}}
153 {{if .Poll}}
154 <form class="poll-form" action="/vote/{{.Poll.ID}}" method="POST" target="_self">
155 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
156 <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
157 <input type="hidden" name="status_id" value="{{$s.ID}}">
158 {{range $i, $o := .Poll.Options}}
159 <div class="poll-option">
160 {{if (or $s.Poll.Expired $s.Poll.Voted)}}
161 <div> {{EmojiFilter (HTML $o.Title) $s.Emojis | Raw}} - {{$o.VotesCount}} votes </div>
162 {{else}}
163 <input type="{{if $s.Poll.Multiple}}checkbox{{else}}radio{{end}}" name="choices"
164 id="poll-{{$s.ID}}-{{$i}}" value="{{$i}}">
165 <label for="poll-{{$s.ID}}-{{$i}}">
166 {{EmojiFilter (HTML $o.Title) $s.Emojis | Raw}}
167 </label>
168 {{end}}
169 </div>
170 {{end}}
171 {{if not (or .Poll.Expired .Poll.Voted)}}
172 <button type="submit"> Voĉdoni </button>
173 {{end}}
174 <div class="poll-info">
175 <span>{{.Poll.VotesCount}} voĉdonoj</span>
176 {{if .Poll.Expired}}
177 <span> - enketo finiĝis </span>
178 {{else if .Poll.ExpiresAt}}
179 <span>
180 - enketo finiĝos je
181 <time datetime="{{FormatTimeRFC3339 .Poll.ExpiresAt}}" title="{{FormatTimeRFC822 .Poll.ExpiresAt}}">
182 {{TimeUntil .Poll.ExpiresAt}}
183 </time>
184 </span>
185 {{end}}
186 </div>
187 </form>
188 {{end}}
189 <div class="status-action-container">
190 <div class="status-action">
191 <a href="/thread/{{.ID}}?reply=true#status-{{.ID}}">
192 respondi
193 </a>
194 <a class="status-reply-count" href="/thread/{{.ID}}#status-{{.ID}}" {{if $.Ctx.ThreadInNewTab}}target="_blank"{{end}}>
195 {{if and (not $.Ctx.AntiDopamineMode) .RepliesCount}}
196 ({{DisplayInteractionCount .RepliesCount}})
197 {{end}}
198 </a>
199 </div>
200 <div class="status-action">
201 {{$rt := "ripeti"}} {{if .Reblogged}} {{$rt = "malripeti"}} {{end}}
202 {{$rtaction := "retweet"}} {{if .Reblogged}} {{$rtaction = "unretweet"}} {{end}}
203 <form class="status-retweet" data-action="{{$rtaction}}" action="/{{$rtaction}}/{{.ID}}" method="post" target="_self">
204 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
205 <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
206 <input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}">
207 <input type="submit" value="{{$rt}}" class="btn-link"
208 {{if or (eq .Visibility "private") (eq .Visibility "direct")}}title="ĉi tiu afiŝo ne povas ripetiĝi" disabled{{end}}>
209 <a class="status-retweet-count" href="/retweetedby/{{.ID}}" title="klaki por montri la liston">
210 {{if and (not $.Ctx.AntiDopamineMode) .ReblogsCount}}
211 ({{DisplayInteractionCount .ReblogsCount}})
212 {{end}}
213 </a>
214 </form>
215 </div>
216 <div class="status-action">
217 {{$like := "ŝati"}} {{if .Favourited}} {{$like = "senŝati"}} {{end}}
218 {{$likeaction := "like"}} {{if .Favourited}} {{$likeaction = "unlike"}} {{end}}
219 <form class="status-like" data-action="{{$likeaction}}" action="/{{$likeaction}}/{{.ID}}" method="post" target="_self">
220 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
221 <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
222 <input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}">
223 <input type="submit" value="{{$like}}" class="btn-link">
224 <a class="status-like-count" href="/likedby/{{.ID}}" title="klaki por montri la liston">
225 {{if and (not $.Ctx.AntiDopamineMode) .FavouritesCount}}
226 ({{DisplayInteractionCount .FavouritesCount}})
227 {{end}}
228 </a>
229 </form>
230 </div>
231 <div class="status-action status-action-last">
232 <a class="status-time" href="{{if not .ShowReplies}}/thread/{{.ID}}{{end}}#status-{{.ID}}"
233 {{if $.Ctx.ThreadInNewTab}}target="_blank"{{end}}>
234 <time datetime="{{FormatTimeRFC3339 .CreatedAt.Time}}" title="{{FormatTimeRFC822 .CreatedAt.Time}}">
235 {{TimeSince .CreatedAt.Time}}
236 </time>
237 </a>
238 </div>
239 </div>
240 </div>
241 </div>
242 {{end}}
243 {{end}}
244 {{end}}
245 </div>
246 {{end}}