views/honkers.html (view raw)
1{{ template "header.html" . }}
2<script src="/misc.js{{ .MiscJSParam }}" defer></script>
3<main>
4<div class="info">
5<p>
6<form action="/submithonker" method="POST">
7<h3>add new honker</h3>
8<input type="hidden" name="CSRF" value="{{ .HonkerCSRF }}">
9<p><label for=url>url:</label><br>
10<input tabindex=1 type="text" name="url" value="" autocomplete=off>
11<p><label for=name>name:</label><br>
12<input tabindex=1 type="text" name="name" value="" placeholder="optional" autocomplete=off>
13<p><label for=combos>combos:</label><br>
14<input tabindex=1 type="text" name="combos" value="" placeholder="optional">
15<p><span><label class=button for="peep">skip subscribe:
16<input tabindex=1 type="checkbox" id="peep" name="peep" value="peep"><span></span></label></span>
17<p><label for="notes">notes:</label><br>
18<textarea tabindex=1 name="notes">
19</textarea>
20<p><button tabindex=1 name="add honker" value="add honker">add honker</button>
21</form>
22</div>
23{{ $honkercsrf := .HonkerCSRF }}
24<div class="info">
25<p><button class="expand">expand</button>
26<p>{{ range .Letters }}<a href="#{{.}}">{{.}}</a> {{ end }}
27</div>
28{{ $firstrune := .FirstRune }}
29{{ $letter := 0 }}
30{{ range .Honkers }}
31{{ if not (eq $letter (call $firstrune .Name)) }}
32{{ $letter = (call $firstrune .Name) }}
33<a name="{{ printf "%c" $letter}}"></a>
34{{ end }}
35<section class="honk">
36<header>
37<img alt="avatar" src="/a?a={{ .XID }}">
38<p class="font18em"><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>