all repos — honk @ 394d8b47c1d37bafad44318b77777af3cc64693a

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 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{{ if eq .Flavor "sub" }}
52<p>unsub: <input type="text" name="goodbye" placeholder="press F" value="" autocomplete=off>
53{{ else }}
54<p>(re)sub: <input type="text" name="goodbye" placeholder="press X" value="" autocomplete=off>
55{{ end }}
56<p><button name="save" value="save">save</button>
57</form>
58</details>
59<p>
60</section>
61{{ end }}
62</main>