all repos — honk @ 04263a1896914ce91f3984b2c4b69e05c3ac24db

my fork of honk

views/honkpage.html (view raw)

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