all repos — honk @ v0.7.5

my fork of honk

views/honkers.html (view raw)

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