all repos — honk @ f6841be8c997c563df8d94eb125b5b6b3cfa196f

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<button onclick="oldestnewest(this)">scroll down</button>
19</div>
20{{ end }}
21<div id="honksonpage">
22<div>
23{{ $BonkCSRF := .HonkCSRF }}
24{{ $IsPreview := .IsPreview }}
25{{ range .Honks }}
26{{ template "honk.html" map "Honk" . "BonkCSRF" $BonkCSRF "IsPreview" $IsPreview }}
27{{ end }}
28</div>
29</div>
30</main>
31{{ if .HonkCSRF }}
32<script>
33var csrftoken = {{ .HonkCSRF }}
34var honksforpage = { }
35var curpagestate = { name: "{{ .PageName }}", arg : "{{ .PageArg }}" }
36var tophid = { }
37tophid[curpagestate.name + ":" + curpagestate.arg] = "{{ .TopHID }}"
38var servermsgs = { }
39servermsgs[curpagestate.name + ":" + curpagestate.arg] = "{{ .ServerMessage }}"
40
41</script>
42<script src="/honkpage.js{{ .JSParam }}"></script>
43{{ end }}