all repos — honk @ d0c3466096be24942914dd6fdc502bb360ce633e

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"><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 }}');">bonk</button>
56{{ end }}
57<button onclick="showhonkform('{{ .Honk.XID }}', '{{ .Honk.Handle }}');">tonk</button>
58<button onclick="muteit(this, '{{ .Honk.Convoy }}');">mute</button>
59<button onclick="zonkit(this, '{{ .Honk.XID }}');">zonk</button>
60</div>
61</details>
62<p>
63{{ end }}
64</article>