all repos — honk @ 30a6d352a8e21cd935f375bc7f06b8a6342b79b8

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