honk/views/honkers.html

55 lines
1.9 KiB
HTML
Raw Normal View History

2019-04-09 13:59:33 +02:00
{{ template "header.html" . }}
<main>
2019-04-09 13:59:33 +02:00
<div class="info">
<p>
2019-09-11 22:20:22 +02:00
<form action="/submithonker" method="POST">
2019-04-09 13:59:33 +02:00
<span class="title">add new honker</span>
<input type="hidden" name="CSRF" value="{{ .HonkerCSRF }}">
<p><input tabindex=1 type="text" name="url" value="" autocomplete=off> - url
<p><input tabindex=1 type="text" name="name" value="" placeholder="optional" autocomplete=off> - name
2019-09-24 19:42:48 +02:00
<p><input tabindex=1 type="text" name="combos" value="" placeholder="optional"> - combos
2019-04-09 13:59:33 +02:00
<p><span><label for="peep">just peeping:</label>
<input tabindex=1 type="checkbox" id="peep" name="peep" value="peep"><span></span></span>
2019-10-01 00:45:18 +02:00
<p><button tabindex=1 name="add honker" value="add honker">add honker</button>
2019-04-09 13:59:33 +02:00
</form>
</div>
{{ $honkercsrf := .HonkerCSRF }}
2019-07-16 03:32:38 +02:00
<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()">expand</button>
</div>
2019-04-09 13:59:33 +02:00
{{ range .Honkers }}
<section class="honk">
<header>
2019-04-24 16:56:39 +02:00
<img alt="avatar" src="/a?a={{ .XID }}">
2019-05-26 22:04:39 +02:00
<p style="font-size: 1.8em"><a href="/h/{{ .Name }}">{{ .Name }}<a>
</header>
2019-07-16 02:21:47 +02:00
<p>
<details>
2019-04-24 16:56:39 +02:00
<p>url: <a href="{{ .XID }}" rel=noreferrer>{{ .XID }}</a>
2019-04-09 13:59:33 +02:00
<p>flavor: {{ .Flavor }}
2019-09-11 22:20:22 +02:00
<form action="/submithonker" method="POST">
2019-04-24 16:56:39 +02:00
<input type="hidden" name="CSRF" value="{{ $honkercsrf }}">
<input type="hidden" name="honkerid" value="{{ .ID }}">
2019-10-07 03:45:58 +02:00
<p>name: <input type="text" name="name" value="{{ .Name }}">
<p>combos: <input type="text" name="combos" value="{{ range .Combos }}{{ . }} {{end}}">
2019-10-07 03:33:10 +02:00
{{ if eq .Flavor "sub" }}
<p>unsub: <input type="text" name="goodbye" placeholder="press F" value="" autocomplete=off>
{{ else }}
2019-10-07 03:43:35 +02:00
<p>(re)sub: <input type="text" name="goodbye" placeholder="press X" value="" autocomplete=off>
2019-10-07 03:33:10 +02:00
{{ end }}
2019-10-01 00:45:18 +02:00
<p><button name="save" value="save">save</button>
</form>
2019-07-16 02:21:47 +02:00
</details>
<p>
</section>
2019-04-09 13:59:33 +02:00
{{ end }}
</main>