all repos — honk @ af8bd1635d0fccb6d331c13c1ceb1aa95f5ba49c

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