all repos — honk @ 5f2e13fd1a44dd23ab1b7f372399781cd4b4c8f2

my fork of honk

views/honkers.html (view raw)

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