views/honk.html (view raw)
1<article class="honk {{ .Honk.Style }}" data-convoy="{{ .Honk.Convoy }}">
2{{ $bonkcsrf := .BonkCSRF }}
3{{ with .Honk }}
4<header>
5{{ if $bonkcsrf }}
6<a class="honkerlink" href="/h?xid={{ .Honker }}" data-xid="{{ .Honker }}">
7{{ else }}
8<a href="{{ .Honker }}" rel=noreferrer>
9{{ end }}
10<img alt="" src="/a?a={{ .Honker}}">
11{{ if $bonkcsrf }} </a> {{ end }}
12{{ if .Oonker }}
13{{ if $bonkcsrf }}
14<a class="honkerlink" href="/h?xid={{ .Oonker }}" data-xid="{{ .Oonker }}">
15{{ else }}
16<a href="{{ .Oonker }}" rel=noreferrer>
17{{ end }}
18<img alt="" src="/a?a={{ .Oonker}}">
19{{ if $bonkcsrf }} </a> {{ end }}
20{{ end }}
21<p>
22{{ if $bonkcsrf }}
23<a class="honkerlink" href="/h?xid={{ .Honker }}" data-xid="{{ .Honker }}">{{ .Username }}</a>
24{{ else }}
25<a href="{{ .Honker }}" rel=noreferrer>{{ .Username }}</a>
26{{ end }}
27<span class="clip"><a href="{{ .URL }}" rel=noreferrer>{{ .What }}</a> {{ .Date.Format "02 Jan 2006 15:04" }}</span>
28{{ if .Oonker }}
29<br>
30<span style="margin-left: 1em;" class="clip">
31{{ if $bonkcsrf }}
32original: <a class="honkerlink" href="/h?xid={{ .Oonker }}" data-xid="{{ .Oonker }}">{{ .Oondle }}</a>
33{{ else }}
34original: <a href="{{ .Oonker }}" rel=noreferrer>{{ .Oondle }}</a>
35{{ end }}
36</span>
37{{ else }}
38{{ if .RID }}
39<br>
40<span style="margin-left: 1em;" class="clip">
41in reply to: <a href="{{ .RID }}" rel=noreferrer>{{ .RID }}</a>
42</span>
43{{ end }}
44{{ end }}
45<br>
46{{ if $bonkcsrf }}
47<span style="margin-left: 1em;" class="clip">convoy: <a class="convoylink" href="/t?c={{ .Convoy }}">{{ .Convoy }}</a></span>
48{{ else }}
49<span style="margin-left: 1em;" class="clip">convoy: {{ .Convoy }}</span>
50{{ end }}
51</header>
52<p>
53<details class="noise" {{ .Open }} >
54<summary>{{ .HTPrecis }}<p></summary>
55<p>{{ .HTPrecis }}
56<p>{{ .HTML }}
57{{ with .Time }}
58<p>Time: {{ .StartTime.Local.Format "03:04PM EDT Mon Jan 02"}}
59{{ if .Duration }}<br>Duration: {{ .Duration }}{{ end }}
60{{ end }}
61{{ with .Place }}
62<p>Location: {{ with .Url }}<a href="{{ . }}" rel=noreferrer>{{ end }}{{ .Name }}{{ if .Url }}</a>{{ end }}{{ if or .Latitude .Longitude }} <a href="https://www.openstreetmap.org/?mlat={{ .Latitude }}&mlon={{ .Longitude}}#map=16/{{ .Latitude }}/{{ .Longitude }}" rel=noreferrer>{{ .Latitude }} {{ .Longitude }}</a>{{ end }}
63{{ end }}
64{{ range .Donks }}
65{{ if .Local }}
66{{ if eq .Media "text/plain" }}
67<p><a href="/d/{{ .XID }}">Attachment: {{ .Name }}</a>
68{{ else }}
69<p><img src="/d/{{ .XID }}" title="{{ .Desc }}" alt="{{ .Desc }}">
70{{ end }}
71{{ else }}
72{{ if .XID }}
73<p><a href="{{ .URL }}">External Attachment: {{ .Name }}</a>
74{{ else }}
75{{ if eq .Media "video/mp4" }}
76<p><video controls src="{{ .URL }}">{{ .Name }}</video>
77{{ else }}
78<p><img src="{{ .URL }}" title="{{ .Desc }}" alt="{{ .Desc }}">
79{{ end }}
80{{ end }}
81{{ end }}
82{{ end }}
83</details>
84{{ end }}
85{{ if $bonkcsrf }}
86<p>
87<details class="actions">
88<summary>Actions
89</summary>
90<div>
91<p>
92{{ if .Honk.Public }}
93{{ if .Honk.IsBonked }}
94<button onclick="unbonk(this, '{{ .Honk.XID }}');">unbonk</button>
95{{ else }}
96<button onclick="bonk(this, '{{ .Honk.XID }}');">bonk</button>
97{{ end }}
98{{ else }}
99<button disabled>nope</button>
100{{ end }}
101<button onclick="showhonkform(this, '{{ .Honk.XID }}', '{{ .Honk.Handle }}');">honk back</button>
102<button onclick="muteit(this, '{{ .Honk.Convoy }}');">mute</button>
103<button onclick="zonkit(this, '{{ .Honk.XID }}');">zonk</button>
104{{ if .Honk.IsAcked }}
105<button onclick="deackit(this, '{{ .Honk.XID }}');">deack</button>
106{{ else }}
107<button onclick="ackit(this, '{{ .Honk.XID }}');">ack</button>
108{{ end }}
109<button><a href="/edit?xid={{ .Honk.XID }}">edit</a></button>
110</div>
111</details>
112<p>
113{{ end }}
114</article>