all repos — honk @ v0.8.6

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