2019-04-09 13:59:33 +02:00
|
|
|
{{ template "header.html" . }}
|
|
|
|
<div class="center">
|
2019-04-11 16:33:05 +02:00
|
|
|
<div class="info" id="infobox">
|
2019-04-09 13:59:33 +02:00
|
|
|
<p>{{ .ServerMessage }}
|
|
|
|
{{ if .HonkCSRF }}
|
|
|
|
{{ template "honkform.html" . }}
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
{{ $BonkCSRF := .HonkCSRF }}
|
|
|
|
{{ range .Honks }}
|
|
|
|
{{ template "honk.html" map "Honk" . "Bonk" $BonkCSRF }}
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ if $BonkCSRF }}
|
|
|
|
<script>
|
|
|
|
function post(url, data) {
|
|
|
|
var x = new XMLHttpRequest()
|
|
|
|
x.open("POST", url)
|
|
|
|
x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
|
|
|
|
x.send(data)
|
|
|
|
}
|
|
|
|
function bonk(xid) {
|
|
|
|
post("/bonk", "CSRF={{ $BonkCSRF }}&xid=" + xid)
|
|
|
|
}
|
2019-04-15 22:18:38 +02:00
|
|
|
function zonkit(xid) {
|
|
|
|
post("/zonkit", "CSRF={{ $BonkCSRF }}&xid=" + xid)
|
|
|
|
}
|
2019-04-09 13:59:33 +02:00
|
|
|
</script>
|
|
|
|
{{ end }}
|