all repos — honk @ 6dc14843423cde8c71228c26493b6135a73da059

my fork of honk

views/chatter.html (view raw)

 1{{ template "header.html" . }}
 2<main>
 3<div class="info">
 4<p>
 5<form action="/sendchonk" method="POST">
 6<h3>new chatter</h3>
 7<input type="hidden" name="CSRF" value="{{ .ChonkCSRF }}">
 8<p><label for=target>target:</label><br>
 9<input type="text" name="target" value="" autocomplete=off>
10<p><label for=noise>noise:</label><br>
11<textarea name="noise" id="noise"></textarea>
12<p><button name="chonk" value="chonk">chonk</button>
13</form>
14</div>
15{{ $chonkcsrf := .ChonkCSRF }}
16{{ range .Chatter }}
17<section class="honk">
18{{ $target := "" }}
19{{ range . }}
20{{ if eq $target "" }}
21{{ $target = .Target }}
22<p class="chattarget">
23chatter: {{ .Target }}
24{{ end }}
25<div class="chat">
26<p>
27<span class="chatstamp">{{ .Date.Local.Format "15:04" }} {{ .Handle }}:</span>
28{{ .HTML }}
29</div>
30{{ end }}
31<form action="/sendchonk" method="POST">
32<input type="hidden" name="CSRF" value="{{ $chonkcsrf }}">
33<input type="hidden" name="target" value="{{ $target }}" autocomplete=off>
34<p><label for=noise>noise:</label><br>
35<textarea name="noise" id="noise"></textarea>
36<p><button name="chonk" value="chonk">chonk</button>
37</form>
38</section>
39{{ end }}
40</main>