honk/views/honkpage.html

40 lines
1.0 KiB
HTML
Raw Normal View History

2019-04-09 13:59:33 +02:00
{{ template "header.html" . }}
2019-04-29 01:16:24 +02:00
<main>
2019-04-23 17:22:31 +02:00
<div class="info" id="infobox">
2019-04-09 13:59:33 +02:00
{{ if .Name }}
<p>{{ .Name }} <span style="margin-left:1em;"><a href="/u/{{ .Name }}/rss">rss</a></span>
<p>{{ .WhatAbout }}
{{ end }}
2019-10-07 18:34:36 +02:00
<div id="srvmsg"><p>{{ .ServerMessage }}</div>
2019-04-23 17:22:31 +02:00
{{ if .HonkCSRF }}
{{ template "honkform.html" . }}
{{ end }}
</div>
{{ if .TopXID }}
<div class="info" id="refreshbox">
2019-08-20 03:03:44 +02:00
<p><button onclick="refreshhonks(this)">refresh</button><span></span>
</div>
{{ end }}
<div id="honksonpage">
2019-09-16 21:15:32 +02:00
<div>
2019-09-19 04:17:50 +02:00
{{ $BonkCSRF := .HonkCSRF }}
2019-04-09 13:59:33 +02:00
{{ range .Honks }}
2019-04-26 15:07:13 +02:00
{{ template "honk.html" map "Honk" . "BonkCSRF" $BonkCSRF }}
2019-04-09 13:59:33 +02:00
{{ end }}
</div>
2019-09-16 21:15:32 +02:00
</div>
2019-04-29 01:16:24 +02:00
</main>
2019-09-19 04:17:50 +02:00
{{ if .HonkCSRF }}
2019-04-23 17:22:31 +02:00
<script>
2019-09-19 04:17:50 +02:00
var csrftoken = {{ .HonkCSRF }}
var honksforpage = { }
var curpagestate = { name: "{{ .PageName }}", arg : "{{ .PageArg }}" }
var topxid = { }
topxid[curpagestate.name + ":" + curpagestate.arg] = "{{ .TopXID }}"
2019-10-07 19:18:30 +02:00
var servermsgs = { }
servermsgs[curpagestate.name + ":" + curpagestate.arg] = "{{ .ServerMessage }}"
2019-04-23 17:22:31 +02:00
</script>
2019-09-19 04:17:50 +02:00
<script src="/honkpage.js{{ .JSParam }}"></script>
2019-04-23 17:22:31 +02:00
{{ end }}