You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
593 B

{{ template "header.html" . }}
<div class="center">
<div class="info" id="infobox">
<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)
}
</script>
{{ end }}