all repos — honk @ 28fa2b6f3e08eeb5c90d4256141a8bbecd4f2b09

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>chatter: {{ .Target }}
23{{ end }}
24<p>
25{{ .Handle }}: {{ .HTML }}
26{{ end }}
27<form action="/sendchonk" method="POST">
28<input type="hidden" name="CSRF" value="{{ $chonkcsrf }}">
29<input type="hidden" name="target" value="{{ $target }}" autocomplete=off>
30<p><label for=noise>noise:</label><br>
31<textarea name="noise" id="noise"></textarea>
32<p><button name="chonk" value="chonk">chonk</button>
33</form>
34</section>
35{{ end }}
36</main>