honk/views/honk.html

58 lines
1.8 KiB
HTML

<article class="honk {{ .Honk.What }} {{ .Honk.Privacy }}">
{{ 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 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 }}
{{ end }}
</div>
{{ end }}
{{ if .BonkCSRF }}
<p>
<div>
{{ if not .Honk.Privacy }}
<button onclick="bonk(this, '{{ .Honk.XID }}'); return false;"><a href="/bonk">bonk</a></button>
<button onclick="showhonkform('{{ .Honk.XID }}', '{{ .Honk.Username }}'); return false;"><a href="/newhonk">tonk</a></button>
{{ end }}
<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 }}">
<select name="wherefore">
<option>this honk</option>
<option>this honker</option>
<option>this convoy</option>
</select>
<button onclick="zonkit(this); return false;"><a href="/zonkit">zonk</a></button>
</form>
</div>
<p>
{{ end }}
</article>