2020-05-13 23:16:18 +02:00
|
|
|
{{ template "header.html" . }}
|
2023-01-26 21:56:48 +01:00
|
|
|
<script src="/misc.js{{ .MiscJSParam }}" defer></script>
|
2020-05-13 23:16:18 +02:00
|
|
|
<main>
|
|
|
|
<div class="info">
|
|
|
|
<p>
|
2020-05-18 03:09:54 +02:00
|
|
|
<form action="/sendchonk" method="POST" enctype="multipart/form-data">
|
2020-05-13 23:16:18 +02:00
|
|
|
<h3>new chatter</h3>
|
|
|
|
<input type="hidden" name="CSRF" value="{{ .ChonkCSRF }}">
|
|
|
|
<p><label for=target>target:</label><br>
|
|
|
|
<input type="text" name="target" value="" autocomplete=off>
|
|
|
|
<p><label for=noise>noise:</label><br>
|
|
|
|
<textarea name="noise" id="noise"></textarea>
|
|
|
|
<p><button name="chonk" value="chonk">chonk</button>
|
2023-01-26 21:56:48 +01:00
|
|
|
<label class=button id="donker">attach: <input type="file" name="donk"><span></span></label>
|
2020-05-13 23:16:18 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{{ $chonkcsrf := .ChonkCSRF }}
|
|
|
|
{{ range .Chatter }}
|
|
|
|
<section class="honk">
|
2020-05-15 05:34:08 +02:00
|
|
|
<p class="chattarget">
|
|
|
|
chatter: {{ .Target }}
|
2020-05-24 01:17:30 +02:00
|
|
|
{{ $target := .Target }}
|
|
|
|
{{ range .Chonks }}
|
2020-05-15 05:34:08 +02:00
|
|
|
<div class="chat">
|
2020-05-13 23:16:18 +02:00
|
|
|
<p>
|
2020-05-15 05:40:06 +02:00
|
|
|
<span class="chatstamp">{{ .Date.Local.Format "15:04" }} {{ .Handle }}:</span>
|
2020-05-15 05:34:08 +02:00
|
|
|
{{ .HTML }}
|
2020-05-15 05:58:49 +02:00
|
|
|
{{ range .Donks }}
|
|
|
|
{{ if .Local }}
|
|
|
|
{{ if eq .Media "text/plain" }}
|
|
|
|
<p><a href="/d/{{ .XID }}">Attachment: {{ .Name }}</a>{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }}
|
|
|
|
{{ else if eq .Media "application/pdf" }}
|
|
|
|
<p><a href="/d/{{ .XID }}">Attachment: {{ .Name }}</a>{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }}
|
|
|
|
{{ else }}
|
|
|
|
<p><img src="/d/{{ .XID }}" title="{{ .Desc }}" alt="{{ .Desc }}">
|
|
|
|
{{ end }}
|
|
|
|
{{ else }}
|
|
|
|
{{ if .XID }}
|
|
|
|
<p><a href="{{ .URL }}" rel=noreferrer>External Attachment: {{ .Name }}</a>{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }}
|
|
|
|
{{ 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 }}
|
2020-05-15 05:34:08 +02:00
|
|
|
</div>
|
2020-05-13 23:16:18 +02:00
|
|
|
{{ end }}
|
2020-05-18 03:09:54 +02:00
|
|
|
<form action="/sendchonk" method="POST" enctype="multipart/form-data">
|
2020-05-14 00:05:38 +02:00
|
|
|
<input type="hidden" name="CSRF" value="{{ $chonkcsrf }}">
|
|
|
|
<input type="hidden" name="target" value="{{ $target }}" autocomplete=off>
|
|
|
|
<p><label for=noise>noise:</label><br>
|
|
|
|
<textarea name="noise" id="noise"></textarea>
|
|
|
|
<p><button name="chonk" value="chonk">chonk</button>
|
2023-01-26 21:56:48 +01:00
|
|
|
<label class=button id="donker">attach: <input type="file" name="donk"><span></span></label>
|
2020-05-14 00:05:38 +02:00
|
|
|
</form>
|
2020-05-13 23:16:18 +02:00
|
|
|
</section>
|
|
|
|
{{ end }}
|
|
|
|
</main>
|