all repos — honk @ 162663bf800442ac3bf3946eb3de755f990589ed

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