You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
3.0 KiB

<article class="honk {{ .Honk.Style }}" data-convoy="{{ .Honk.Convoy }}">
{{ $bonkcsrf := .BonkCSRF }}
5 years ago
{{ with .Honk }}
<header>
<img alt="" src="/a?a={{ .Honker}}">
{{ if .Oonker }}
<img alt="" src="/a?a={{ .Oonker}}">
{{ end }}
<p>
{{ if $bonkcsrf }}
<a class="honkerlink" href="/h?xid={{ .Honker }}">{{ .Username }}</a>
{{ else }}
<a href="{{ .Honker }}" rel=noreferrer>{{ .Username }}</a>
{{ end }}
<span class="clip"><a href="{{ .URL }}" rel=noreferrer>{{ .What }}</a> {{ .Date.Format "02 Jan 2006 15:04" }}</span>
{{ if .Oonker }}
<br>
<span style="margin-left: 1em;" class="clip">
{{ if $bonkcsrf }}
original: <a class="honkerlink" href="/h?xid={{ .Oonker }}">{{ .Oondle }}</a>
{{ else }}
original: <a href="{{ .Oonker }}" rel=noreferrer>{{ .Oondle }}</a>
{{ end }}
</span>
{{ else }}
{{ if .RID }}
<br>
<span style="margin-left: 1em;" class="clip">
in reply to: <a href="{{ .RID }}" rel=noreferrer>{{ .RID }}</a>
</span>
{{ end }}
{{ end }}
<br>
{{ if $bonkcsrf }}
<span style="margin-left: 1em;" class="clip">convoy: <a class="convoylink" href="/t?c={{ .Convoy }}">{{ .Convoy }}</a></span>
{{ else }}
<span style="margin-left: 1em;" class="clip">convoy: {{ .Convoy }}</span>
{{ end }}
</header>
<p>
<details class="noise" {{ .Open }} >
<summary>{{ .HTPrecis }}<p></summary>
<p>{{ .HTPrecis }}
<p>{{ .HTML }}
{{ with .Time }}
<p>Time: {{ .StartTime.Local }}
{{ end }}
{{ with .Place }}
<p>Location: {{ with .Url }}<a href="{{ . }}" rel=noreferrer>{{ end }}{{ .Name }}{{ if .Url }}</a>{{ end }} <a href="https://www.openstreetmap.org/?mlat={{ .Latitude }}&mlon={{ .Longitude}}" rel=noreferrer>{{ .Latitude }} {{ .Longitude }}</a>
{{ end }}
5 years ago
{{ range .Donks }}
{{ if .Local }}
{{ if eq .Media "text/plain" }}
<p><a href="/d/{{ .XID }}">Attachment: {{ .Name }}</a>
{{ else }}
<p><img src="/d/{{ .XID }}" title="{{ .Desc }}" alt="{{ .Desc }}">
5 years ago
{{ end }}
{{ else }}
5 years ago
{{ if .XID }}
<p><a href="{{ .URL }}">External Attachment: {{ .Name }}</a>
5 years ago
{{ else }}
{{ if eq .Media "video/mp4" }}
<p><video controls src="{{ .URL }}">{{ .Name }}</video>
5 years ago
{{ else }}
<p><img src="{{ .URL }}" title="{{ .Desc }}" alt="{{ .Desc }}">
5 years ago
{{ end }}
{{ end }}
{{ end }}
5 years ago
{{ end }}
</details>
{{ end }}
{{ if $bonkcsrf }}
5 years ago
<p>
<details class="actions">
<summary>Actions
</summary>
<div>
<p>
{{ if .Honk.Public }}
{{ if .Honk.IsBonked }}
<button onclick="unbonk(this, '{{ .Honk.XID }}');">unbonk</button>
{{ else }}
<button onclick="bonk(this, '{{ .Honk.XID }}');">bonk</button>
{{ end }}
{{ else }}
<button disabled>nope</button>
{{ end }}
<button onclick="showhonkform(this, '{{ .Honk.XID }}', '{{ .Honk.Handle }}');">honk back</button>
<button onclick="muteit(this, '{{ .Honk.Convoy }}');">mute</button>
<button onclick="zonkit(this, '{{ .Honk.XID }}');">zonk</button>
{{ if .Honk.IsAcked }}
<button onclick="deackit(this, '{{ .Honk.XID }}');">deack</button>
{{ else }}
<button onclick="ackit(this, '{{ .Honk.XID }}');">ack</button>
{{ end }}
<button><a href="/edit?xid={{ .Honk.XID }}">edit</a></button>
</div>
</details>
<p>
5 years ago
{{ end }}
</article>