129 lines
4.4 KiB
HTML
129 lines
4.4 KiB
HTML
<article class="honk {{ .Honk.Style }}" data-convoy="{{ .Honk.Convoy }}">
|
|
{{ $bonkcsrf := .BonkCSRF }}
|
|
{{ $IsPreview := .IsPreview }}
|
|
{{ $maplink := .MapLink }}
|
|
{{ with .Honk }}
|
|
<header>
|
|
{{ if $bonkcsrf }}
|
|
<a class="honkerlink" href="/h?xid={{ .Honker }}" data-xid="{{ .Honker }}">
|
|
{{ else }}
|
|
<a href="{{ .Honker }}" rel=noreferrer>
|
|
{{ end }}
|
|
<img alt="" src="/a?a={{ .Honker}}">
|
|
{{ if $bonkcsrf }} </a> {{ end }}
|
|
{{ if .Oonker }}
|
|
{{ if $bonkcsrf }}
|
|
<a class="honkerlink" href="/h?xid={{ .Oonker }}" data-xid="{{ .Oonker }}">
|
|
{{ else }}
|
|
<a href="{{ .Oonker }}" rel=noreferrer>
|
|
{{ end }}
|
|
<img alt="" src="/a?a={{ .Oonker}}">
|
|
{{ if $bonkcsrf }} </a> {{ end }}
|
|
{{ end }}
|
|
<p>
|
|
{{ if $bonkcsrf }}
|
|
<a class="honkerlink" href="/h?xid={{ .Honker }}" data-xid="{{ .Honker }}">{{ .Username }}</a>
|
|
{{ else }}
|
|
<a href="{{ .Honker }}" rel=noreferrer>{{ .Username }}</a>
|
|
{{ end }}
|
|
<span class="clip"><a href="{{ .URL }}" rel=noreferrer>{{ .What }}</a> {{ .Date.Local.Format "02 Jan 2006 15:04 -0700" }}</span>
|
|
{{ if .Oonker }}
|
|
<br>
|
|
<span style="margin-left: 1em;" class="clip">
|
|
{{ if $bonkcsrf }}
|
|
original: <a class="honkerlink" href="/h?xid={{ .Oonker }}" data-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.Format "03:04PM EDT Mon Jan 02"}}
|
|
{{ if .Duration }}<br>Duration: {{ .Duration }}{{ end }}
|
|
{{ end }}
|
|
{{ with .Place }}
|
|
<p>Location: {{ with .Url }}<a href="{{ . }}" rel=noreferrer>{{ end }}{{ .Name }}{{ if .Url }}</a>{{ end }}{{ if or .Latitude .Longitude }} <a href="{{ if eq $maplink "apple" }}https://maps.apple.com/?q={{ or .Name "here" }}&z=16&ll={{ .Latitude }},{{ .Longitude }}{{ else }}https://www.openstreetmap.org/?mlat={{ .Latitude }}&mlon={{ .Longitude}}#map=16/{{ .Latitude }}/{{ .Longitude }}{{ end }}" rel=noreferrer>{{ .Latitude }} {{ .Longitude }}</a>{{ end }}
|
|
{{ end }}
|
|
{{ range .Donks }}
|
|
{{ if .Local }}
|
|
{{ if eq .Media "text/plain" }}
|
|
<p><a href="/d/{{ .XID }}">Attachment: {{ .Name }}</a> {{ .Desc }}
|
|
{{ else if eq .Media "application/pdf" }}
|
|
<p><a href="/d/{{ .XID }}">Attachment: {{ .Name }}</a> {{ .Desc }}
|
|
{{ else }}
|
|
<p><img src="/d/{{ .XID }}" title="{{ .Desc }}" alt="{{ .Desc }}">
|
|
{{ end }}
|
|
{{ else }}
|
|
{{ if .XID }}
|
|
<p><a href="{{ .URL }}" rel=noreferrer>External Attachment: {{ .Name }}</a>
|
|
{{ else }}
|
|
{{ if eq .Media "video/mp4" }}
|
|
<p><video controls src="{{ .URL }}">{{ .Name }}</video>
|
|
{{ else }}
|
|
<p><img src="{{ .URL }}" title="{{ .Desc }}" alt="{{ .Desc }}">
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
</details>
|
|
{{ end }}
|
|
{{ if and $bonkcsrf (not $IsPreview) }}
|
|
<p>
|
|
<details class="actions">
|
|
<summary>Actions
|
|
</summary>
|
|
<div>
|
|
<p>
|
|
{{ if .Honk.Public }}
|
|
{{ if .Honk.IsBonked }}
|
|
<button onclick="return unbonk(this, '{{ .Honk.XID }}');">unbonk</button>
|
|
{{ else }}
|
|
<button onclick="return bonk(this, '{{ .Honk.XID }}');">bonk</button>
|
|
{{ end }}
|
|
{{ else }}
|
|
<button disabled>nope</button>
|
|
{{ end }}
|
|
<button onclick="return showhonkform(this, '{{ .Honk.XID }}', '{{ .Honk.Handle }}');"><a href="/newhonk?rid={{ .Honk.XID }}">honk back</a></button>
|
|
<button onclick="return muteit(this, '{{ .Honk.Convoy }}');">mute</button>
|
|
<button onclick="return zonkit(this, '{{ .Honk.XID }}');">zonk</button>
|
|
{{ if .Honk.IsAcked }}
|
|
<button onclick="return flogit(this, 'deack', '{{ .Honk.XID }}');">deack</button>
|
|
{{ else }}
|
|
<button onclick="return flogit(this, 'ack', '{{ .Honk.XID }}');">ack</button>
|
|
{{ end }}
|
|
{{ if .Honk.IsSaved }}
|
|
<button onclick="return flogit(this, 'unsave', '{{ .Honk.XID }}');">unsave</button>
|
|
{{ else }}
|
|
<button onclick="return flogit(this, 'save', '{{ .Honk.XID }}');">save</button>
|
|
{{ end }}
|
|
{{ if .Honk.IsUntagged }}
|
|
<button disabled>untagged</button>
|
|
{{ else }}
|
|
<button onclick="return flogit(this, 'untag', '{{ .Honk.XID }}');">untag me</button>
|
|
{{ end }}
|
|
<button><a href="/edit?xid={{ .Honk.XID }}">edit</a></button>
|
|
</div>
|
|
</details>
|
|
<p>
|
|
{{ end }}
|
|
</article>
|