all repos — honk @ 48a2c70ffc89605ed78ca836fe6abab31470f9b1

my fork of honk

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">{{ .What }} {{ .Date.Format "02 Jan 2006 15:04" }} <a href="{{ .URL }}" rel=noreferrer>{{ .URL }}</a></span>
 6{{ if .Oonker }}
 7<br>
 8<span style="margin-left: 3em;" class="clip">
 9original: {{ .Oonker }}
10</span>
11{{ else }}
12{{ if .RID }}
13<br>
14<span style="margin-left: 3em;" 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: 3em;" 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<div>
50{{ if .Honk.Public }}
51<button onclick="bonk(this, '{{ .Honk.XID }}'); return false;"><a href="/bonk">bonk</a></button>
52{{ end }}
53<button onclick="showhonkform('{{ .Honk.XID }}', '{{ .Honk.Username }}'); return false;"><a href="/newhonk">tonk</a></button>
54<form class="inlineform" action="/zonkit" method="POST">
55<input type="hidden" name="CSRF" value="{{ .BonkCSRF }}">
56<input type="hidden" name="honk" value="{{ .Honk.XID }}">
57<input type="hidden" name="honker" value="{{ .Honk.Honker }}">
58<input type="hidden" name="convoy" value="{{ .Honk.Convoy }}">
59<select name="wherefore">
60<option>this honk</option>
61<option>this honker</option>
62<option>this convoy</option>
63</select>
64<button onclick="zonkit(this); return false;"><a href="/zonkit">zonk</a></button>
65</form>
66</div>
67<p>
68{{ end }}
69</article>