all repos — honk @ 56da28ed8e2d4a1847eb873d7e146de806ce1e86

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{{ if eq .Flavor "sub" }}
43<p>unsub: <input type="text" name="goodbye" placeholder="press F" value="" autocomplete=off>
44{{ else }}
45<p>(re)sub: <input type="text" name="goodbye" placeholder="press X" value="" autocomplete=off>
46{{ end }}
47<p><button name="save" value="save">save</button>
48</form>
49</details>
50<p>
51</section>
52{{ end }}
53</main>