all repos — honk @ d454707124f456ae0cae07600ff5ff7ab41cac7a

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