honk/views/honkpage.html

37 lines
941 B
HTML

{{ template "header.html" . }}
<main>
<div class="info" id="infobox">
{{ if .Name }}
<p>{{ .Name }} <span style="margin-left:1em;"><a href="/u/{{ .Name }}/rss">rss</a></span>
<p>{{ .WhatAbout }}
{{ end }}
<div id="srvmsg"><p>{{ .ServerMessage }}</div>
{{ if .HonkCSRF }}
{{ template "honkform.html" . }}
{{ end }}
</div>
{{ if .TopXID }}
<div class="info" id="refreshbox">
<p><button onclick="refreshhonks(this)">refresh</button><span></span>
</div>
{{ end }}
<div id="honksonpage">
<div>
{{ $BonkCSRF := .HonkCSRF }}
{{ range .Honks }}
{{ template "honk.html" map "Honk" . "BonkCSRF" $BonkCSRF }}
{{ end }}
</div>
</div>
</main>
{{ if .HonkCSRF }}
<script>
var csrftoken = {{ .HonkCSRF }}
var honksforpage = { }
var curpagestate = { name: "{{ .PageName }}", arg : "{{ .PageArg }}" }
var topxid = { }
topxid[curpagestate.name + ":" + curpagestate.arg] = "{{ .TopXID }}"
</script>
<script src="/honkpage.js{{ .JSParam }}"></script>
{{ end }}