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