all repos — honk @ 974d20c1131131149f0ec326051f4e12da823c71

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<p>{{ .ServerMessage }}
 9{{ if .HonkCSRF }}
10{{ template "honkform.html" . }}
11{{ end }}
12</div>
13{{ if .TopXID }}
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 }}"
34</script>
35<script src="/honkpage.js{{ .JSParam }}"></script>
36{{ end }}