all repos — honk @ bafe9960d9cbc6fa533e8c91fed384ebe0d15962

my fork of honk

views/honkpage.html (view raw)

 1{{ template "header.html" . }}
 2<main>
 3<div class="info" id="infobox">
 4<div id="srvmsg">
 5{{ if .Name }}
 6<p>{{ .Name }} <span style="margin-left:1em;"><a href="/u/{{ .Name }}/rss">rss</a></span>
 7<p>{{ .WhatAbout }}
 8{{ end }}
 9<p>{{ .ServerMessage }}
10</div>
11{{ if .HonkCSRF }}
12{{ template "honkform.html" . }}
13{{ end }}
14</div>
15{{ if and .HonkCSRF (not .IsPreview) }}
16<div class="info" id="refreshbox">
17<p><button onclick="refreshhonks(this)">refresh</button><span></span>
18</div>
19{{ end }}
20<div id="honksonpage">
21<div>
22{{ $BonkCSRF := .HonkCSRF }}
23{{ $IsPreview := .IsPreview }}
24{{ range .Honks }}
25{{ template "honk.html" map "Honk" . "BonkCSRF" $BonkCSRF "IsPreview" $IsPreview }}
26{{ end }}
27</div>
28</div>
29</main>
30{{ if .HonkCSRF }}
31<script>
32var csrftoken = {{ .HonkCSRF }}
33var honksforpage = { }
34var curpagestate = { name: "{{ .PageName }}", arg : "{{ .PageArg }}" }
35var tophid = { }
36tophid[curpagestate.name + ":" + curpagestate.arg] = "{{ .TopHID }}"
37var servermsgs = { }
38servermsgs[curpagestate.name + ":" + curpagestate.arg] = "{{ .ServerMessage }}"
39
40</script>
41<script src="/honkpage.js{{ .JSParam }}"></script>
42{{ end }}