all repos — honk @ 73feab08b04e6175ecfb79100460ccb5ec27bcc8

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{{ $bonkcsrf := .BonkCSRF }}
 3{{ with .Honk }}
 4<header>
 5<img alt="avatar" src="/a?a={{ .Honker}}">
 6<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>
 7{{ if .Oonker }}
 8<br>
 9<span style="margin-left: 1em;" class="clip">
10original: {{ .Oonker }}
11</span>
12{{ else }}
13{{ if .RID }}
14<br>
15<span style="margin-left: 1em;" class="clip">
16in reply to: <a href="{{ .RID }}" rel=noreferrer>{{ .RID }}</a>
17</span>
18{{ end }}
19{{ end }}
20<br>
21{{ if $bonkcsrf }}
22<span style="margin-left: 1em;" class="clip">convoy: <a href="/t?c={{ .Convoy }}">{{ .Convoy }}</a></span>
23{{ else }}
24<span style="margin-left: 1em;" class="clip">convoy: {{ .Convoy }}</span>
25{{ end }}
26</header>
27<div class="noise">
28<p>{{ .HTML }}
29{{ range .Donks }}
30{{ if .Local }}
31{{ if eq .Media "text/plain" }}
32<p><a href="/d/{{ .XID }}">Attachment: {{ .Name }}</a>
33{{ else }}
34<p><a href="/d/{{ .XID }}"><img src="/d/{{ .XID }}" title="{{ .URL }}"></a>
35{{ end }}
36{{ else }}
37{{ if .XID }}
38<p><a href="{{ .URL }}">External Attachment: {{ .Name }}</a>
39{{ else }}
40{{ if eq .Media "video/mp4" }}
41<p><a href="{{ .URL }}"><video controls src="{{ .URL }}">{{ .Name }}</video></a>
42{{ else }}
43<p><a href="{{ .URL }}"><img src="{{ .URL }}" title="{{ .Name }}"></a>
44{{ end }}
45{{ end }}
46{{ end }}
47{{ end }}
48</div>
49{{ end }}
50{{ if $bonkcsrf }}
51<p>
52<details>
53<summary>Actions
54</summary>
55<div>
56<p>
57{{ if .Honk.Public }}
58<button onclick="bonk(this, '{{ .Honk.XID }}');">bonk</button>
59{{ else }}
60<button disabled>nope</button>
61{{ end }}
62<button onclick="showhonkform('{{ .Honk.XID }}', '{{ .Honk.Handle }}');">tonk</button>
63<button onclick="muteit(this, '{{ .Honk.Convoy }}');">mute</button>
64<button onclick="zonkit(this, '{{ .Honk.XID }}');">zonk</button>
65</div>
66</details>
67<p>
68{{ end }}
69</article>