aboutsummaryrefslogtreecommitdiff
path: root/views/i18n/honkers.html
blob: 5b9ecf41f512013c088440c3fde6df9186e72420 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{{ template "header.html" . }}
<main>
{{ $i18n := .i18n }}
<div class="info">
<p>
<form action="/submithonker" method="POST">
<h3>{{ $i18n.AddNewHonker }}</h3>
<input type="hidden" name="CSRF" value="{{ .HonkerCSRF }}">
<p><label for=url>url:</label><br>
<input tabindex=1 type="text" name="url" value="" autocomplete=off>
<p><label for=name>{{ $i18n.Name }}:</label><br>
<input tabindex=1 type="text" name="name" value="" placeholder="{{ $i18n.Optional }}" autocomplete=off>
<p><label for=combos>{{ $i18n.Combos }}:</label><br>
<input tabindex=1 type="text" name="combos" value="" placeholder="{{ $i18n.Optional }}">
<p><span><label class=button for="peep">{{ $i18n.SkipSub }}:
<input tabindex=1 type="checkbox" id="peep" name="peep" value="peep"><span></span></label></span>
<p><label for="notes">notes:</label><br>
<textarea tabindex=1 name="notes">
</textarea>
<p><button tabindex=1 name="add honker" value="add honker">{{ $i18n.AddHonkerBtn }}</button>
</form>
</div>
{{ $honkercsrf := .HonkerCSRF }}
<div class="info">
<script>
function expandstuff() {
	var els = document.querySelectorAll(".honk details")
	for (var i = 0; i < els.length; i++) {
		els[i].open = true
	}
}
</script>
<p><button onclick="expandstuff()">{{ $i18n.Expand }}</button>
</div>
{{ range .Honkers }}
<section class="honk">
<header>
<img alt="avatar" src="/a?a={{ .XID }}">
<p style="font-size: 1.8em"><a href="/h/{{ .Name }}">{{ .Name }}<a>
</header>
<p>
<details>
<p>url: <a href="{{ .XID }}" rel=noreferrer>{{ .XID }}</a>
<p>{{ $i18n.Flavor }}: {{ .Flavor }}
<form action="/submithonker" method="POST">
<input type="hidden" name="CSRF" value="{{ $honkercsrf }}">
<input type="hidden" name="honkerid" value="{{ .ID }}">
<p>{{ $i18n.Name }}: <input type="text" name="name" value="{{ .Name }}">
<p><label for="notes">{{ $i18n.Notes }}:</label><br>
<textarea name="notes">{{ .Meta.Notes }}</textarea>
<p>{{ $i18n.Combos }}: <input type="text" name="combos" value="{{ range .Combos }}{{ . }} {{end}}">
<p>
<button name="save" value="save">{{ $i18n.Save }}</button>
<button name="sub" value="sub">{{ $i18n.Resub }}</button>
<button name="unsub" value="unsub">{{ $i18n.Unsub }}</button>
<button name="delete" value="delete">{{ $i18n.Delete }}</button>
</form>
</details>
<p>
</section>
{{ end }}
</main>