all repos — honk @ 28fa2b6f3e08eeb5c90d4256141a8bbecd4f2b09

my fork of honk

chat backs
Ted Unangst tedu@tedunangst.com
Wed, 13 May 2020 18:05:38 -0400
commit

28fa2b6f3e08eeb5c90d4256141a8bbecd4f2b09

parent

c41a26dfedd7f9cda0ebeda7b9be7f95f4eb9006

2 files changed, 13 insertions(+), 1 deletions(-)

jump to
M fun.gofun.go

@@ -190,7 +190,7 @@ }

if short := shortname(ch.UserID, ch.Who); short != "" { ch.Handle = short } else { - _, ch.Handle = handles(ch.Who) + ch.Handle, _ = handles(ch.Who) } }
M views/chatter.htmlviews/chatter.html

@@ -15,10 +15,22 @@ </div>

{{ $chonkcsrf := .ChonkCSRF }} {{ range .Chatter }} <section class="honk"> +{{ $target := "" }} {{ range . }} +{{ if eq $target "" }} +{{ $target = .Target }} +<p>chatter: {{ .Target }} +{{ end }} <p> {{ .Handle }}: {{ .HTML }} {{ end }} +<form action="/sendchonk" method="POST"> +<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> +</form> </section> {{ end }} </main>