75 lines
2.2 KiB
HTML
75 lines
2.2 KiB
HTML
<article class="honk {{ .Honk.What }} {{ and (not .Honk.Public) "limited" }}" data-convoy="{{ .Honk.Convoy }}">
|
|
{{ with .Honk }}
|
|
<header>
|
|
<img alt="avatar" src="/a?a={{ .Honker}}">
|
|
<p><a href="{{ .Honker }}" rel=noreferrer>{{ .Username }}</a> <span class="clip">{{ .What }} {{ .Date.Format "02 Jan 2006 15:04" }} <a href="{{ .URL }}" rel=noreferrer>{{ .URL }}</a></span>
|
|
{{ if .Oonker }}
|
|
<br>
|
|
<span style="margin-left: 3em;" class="clip">
|
|
original: {{ .Oonker }}
|
|
</span>
|
|
{{ else }}
|
|
{{ if .RID }}
|
|
<br>
|
|
<span style="margin-left: 3em;" class="clip">
|
|
in reply to: <a href="{{ .RID }}" rel=noreferrer>{{ .RID }}</a>
|
|
</span>
|
|
{{ end }}
|
|
{{ end }}
|
|
<br>
|
|
<span style="margin-left: 3em;" class="clip">
|
|
convoy: <a href="/t?c={{ .Convoy }}">{{ .Convoy }}</a>
|
|
</span>
|
|
</header>
|
|
<div class="noise">
|
|
<p>{{ .HTML }}
|
|
{{ range .Donks }}
|
|
{{ if .Local }}
|
|
{{ if eq .Media "text/plain" }}
|
|
<p><a href="/d/{{ .XID }}">Attachment: {{ .Name }}</a>
|
|
{{ else }}
|
|
<p><a href="/d/{{ .XID }}"><img src="/d/{{ .XID }}" title="{{ .URL }}"></a>
|
|
{{ end }}
|
|
{{ else }}
|
|
{{ if .XID }}
|
|
<p><a href="{{ .URL }}">External Attachment: {{ .Name }}</a>
|
|
{{ else }}
|
|
{{ if eq .Media "video/mp4" }}
|
|
<p><a href="{{ .URL }}"><video controls src="{{ .URL }}">{{ .Name }}</video></a>
|
|
{{ else }}
|
|
<p><a href="{{ .URL }}"><img src="{{ .URL }}" title="{{ .Name }}"></a>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
{{ end }}
|
|
{{ if .BonkCSRF }}
|
|
<p>
|
|
<details>
|
|
<summary>Actions
|
|
</summary>
|
|
<div>
|
|
<p>
|
|
{{ if .Honk.Public }}
|
|
<button onclick="bonk(this, '{{ .Honk.XID }}'); return false;"><a href="/bonk">bonk</a></button>
|
|
{{ end }}
|
|
<button onclick="showhonkform('{{ .Honk.XID }}', '{{ .Honk.Username }}'); return false;"><a href="/newhonk">tonk</a></button>
|
|
<form class="inlineform" action="/zonkit" method="POST">
|
|
<input type="hidden" name="CSRF" value="{{ .BonkCSRF }}">
|
|
<input type="hidden" name="honk" value="{{ .Honk.XID }}">
|
|
<input type="hidden" name="honker" value="{{ .Honk.Honker }}">
|
|
<input type="hidden" name="convoy" value="{{ .Honk.Convoy }}">
|
|
<button onclick="zonkit(this); return false;"><a href="/zonkit">zonk</a></button>
|
|
<select name="wherefore">
|
|
<option>this honk</option>
|
|
<option>this honker</option>
|
|
<option>this convoy</option>
|
|
</select>
|
|
</form>
|
|
</div>
|
|
</details>
|
|
<p>
|
|
{{ end }}
|
|
</article>
|