views/honkers.html (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
{{ template "header.html" . }} <main> <div class="info"> <p> <form action="/submithonker" method="POST"> <span class="title">add new honker</span> <input type="hidden" name="CSRF" value="{{ .HonkerCSRF }}"> <p><input tabindex=1 type="text" name="url" value="" autocomplete=off> - url <p><input tabindex=1 type="text" name="name" value="" placeholder="optional" autocomplete=off> - name <p><input tabindex=1 type="text" name="combos" value="" placeholder="optional"> - combos <p><span><label for="peep">just peeping:</label> <input tabindex=1 type="checkbox" id="peep" name="peep" value="peep"><span></span></span> <p><input tabindex=1 type="submit" name="add honker" value="add honker"> </form> </div> {{ $honkercsrf := .HonkerCSRF }} <div class="info"> <script> function expandstuff() { var els = document.querySelectorAll(".honk details") for (var i = 0; i < els.length; i++) { els[i].open = true } } </script> <p><button onclick="expandstuff()">expand</button> </div> {{ range .Honkers }} <section class="honk"> <header> <img alt="avatar" src="/a?a={{ .XID }}"> <p style="font-size: 1.8em"><a href="/h/{{ .Name }}">{{ .Name }}<a> </header> <p> <details> <p>url: <a href="{{ .XID }}" rel=noreferrer>{{ .XID }}</a> <p>flavor: {{ .Flavor }} <form action="/submithonker" method="POST"> <input type="hidden" name="CSRF" value="{{ $honkercsrf }}"> <input type="hidden" name="honkerid" value="{{ .ID }}"> <p>combos: <input type="text" name="combos" value="{{ range .Combos }}{{ . }} {{end}}"> <p>depart: <input type="text" name="goodbye" placeholder="press F" value="" autocomplete=off> <p><input type="submit" name="save" value="save"> </form> </details> <p> </section> {{ end }} </main> |