views/honk.html (view raw)
1<article class="honk {{ .Honk.What }} {{ and (not .Honk.Public) "limited" }}" data-convoy="{{ .Honk.Convoy }}">
2{{ with .Honk }}
3<header>
4<img alt="avatar" src="/a?a={{ .Honker}}">
5<p><a href="{{ .Honker }}" rel=noreferrer>{{ .Username }}</a> <span class="clip"><a href="{{ .URL }}" rel=noreferrer>{{ .What }}</a> {{ .Date.Format "02 Jan 2006 15:04" }}</span>
6{{ if .Oonker }}
7<br>
8<span style="margin-left: 1em;" class="clip">
9original: {{ .Oonker }}
10</span>
11{{ else }}
12{{ if .RID }}
13<br>
14<span style="margin-left: 1em;" class="clip">
15in reply to: <a href="{{ .RID }}" rel=noreferrer>{{ .RID }}</a>
16</span>
17{{ end }}
18{{ end }}
19<br>
20<span style="margin-left: 1em;" class="clip">
21convoy: <a href="/t?c={{ .Convoy }}">{{ .Convoy }}</a>
22</span>
23</header>
24<div class="noise">
25<p>{{ .HTML }}
26{{ range .Donks }}
27{{ if .Local }}
28{{ if eq .Media "text/plain" }}
29<p><a href="/d/{{ .XID }}">Attachment: {{ .Name }}</a>
30{{ else }}
31<p><a href="/d/{{ .XID }}"><img src="/d/{{ .XID }}" title="{{ .URL }}"></a>
32{{ end }}
33{{ else }}
34{{ if .XID }}
35<p><a href="{{ .URL }}">External Attachment: {{ .Name }}</a>
36{{ else }}
37{{ if eq .Media "video/mp4" }}
38<p><a href="{{ .URL }}"><video controls src="{{ .URL }}">{{ .Name }}</video></a>
39{{ else }}
40<p><a href="{{ .URL }}"><img src="{{ .URL }}" title="{{ .Name }}"></a>
41{{ end }}
42{{ end }}
43{{ end }}
44{{ end }}
45</div>
46{{ end }}
47{{ if .BonkCSRF }}
48<p>
49<details>
50<summary>Actions
51</summary>
52<div>
53<p>
54{{ if .Honk.Public }}
55<button onclick="bonk(this, '{{ .Honk.XID }}'); return false;"><a href="/bonk">bonk</a></button>
56{{ end }}
57<button onclick="showhonkform('{{ .Honk.XID }}', '{{ .Honk.Handle }}'); return false;"><a href="/newhonk">tonk</a></button>
58<form class="inlineform" action="/zonkit" method="POST">
59<input type="hidden" name="CSRF" value="{{ .BonkCSRF }}">
60<input type="hidden" name="honk" value="{{ .Honk.XID }}">
61<input type="hidden" name="honker" value="{{ .Honk.Honker }}">
62<input type="hidden" name="convoy" value="{{ .Honk.Convoy }}">
63<button onclick="zonkit(this); return false;"><a href="/zonkit">zonk</a></button>
64<select name="wherefore">
65<option>this honk</option>
66<option>this honker</option>
67<option>this convoy</option>
68</select>
69</form>
70</div>
71</details>
72<p>
73{{ end }}
74</article>