all repos — honk @ a504f3774072be850266c2ecfe95e583daba38ff

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<script>
14var csrftoken = {{ .HonkCSRF }}
15var honksforpage = { }
16var curpagestate = { name: "{{ .PageName }}", arg : "{{ .PageArg }}" }
17var tophid = { }
18tophid[curpagestate.name + ":" + curpagestate.arg] = "{{ .TopHID }}"
19var servermsgs = { }
20servermsgs[curpagestate.name + ":" + curpagestate.arg] = "{{ .ServerMessage }}"
21</script>
22<script src="/honkpage.js{{ .JSParam }}"></script>
23{{ end }}
24</div>
25{{ if and .HonkCSRF (not .IsPreview) }}
26<div class="info" id="refreshbox">
27<p><button onclick="refreshhonks(this)">refresh</button><span></span>
28<button onclick="oldestnewest(this)">scroll down</button>
29</div>
30{{ if eq .ServerMessage "one honk maybe more" }} <script> hideelement("refreshbox")</script> {{ end }}
31{{ end }}
32<div id="honksonpage">
33<div>
34{{ $BonkCSRF := .HonkCSRF }}
35{{ $IsPreview := .IsPreview }}
36{{ $MapLink := .MapLink }}
37{{ $Badonk := .User.Options.Reaction }}
38{{ $OmitImages := .User.Options.OmitImages }}
39{{ range .Honks }}
40{{ template "honk.html" map "Honk" . "MapLink" $MapLink "BonkCSRF" $BonkCSRF "IsPreview" $IsPreview "Badonk" $Badonk "OmitImages" $OmitImages }}
41{{ end }}
42</div>
43</div>
44</main>