all repos — honk @ a02d2ba4cb2152ef4ab5720a64ec6f7cc6a1f389

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<<<<<<< HEAD
 7<p>{{ .Name }} <span class="left1em"><a href="/u/{{ .Name }}/rss">rss</a></span>
 8=======
 9<p>{{ .Name }} <span style="margin-left:1em;"><a href="/u/{{ .Name }}/rss">rss</a></span>
10>>>>>>> 4506960 (import)
11<p>{{ .WhatAbout }}
12{{ end }}
13<p>{{ .ServerMessage }}
14</div>
15{{ if .HonkCSRF }}
16{{ template "honkform.html" . }}
17<<<<<<< HEAD
18<script src="/honkpage.js{{ .JSParam }}" defer data-csrf="{{ .HonkCSRF }}" data-pagename="{{ .PageName }}" data-pagearg="{{ .PageArg }}" data-tophid="{{ .TopHID }}" data-srvmsg="{{ .ServerMessage }}"></script>
19{{ end }}
20{{ if .LocalJSParam }}
21<script src="/local.js{{ .LocalJSParam }}" defer></script>
22=======
23<script>
24var csrftoken = {{ .HonkCSRF }}
25var honksforpage = { }
26var curpagestate = { name: "{{ .PageName }}", arg : "{{ .PageArg }}" }
27var tophid = { }
28tophid[curpagestate.name + ":" + curpagestate.arg] = "{{ .TopHID }}"
29var servermsgs = { }
30servermsgs[curpagestate.name + ":" + curpagestate.arg] = "{{ .ServerMessage }}"
31</script>
32<script src="/honkpage.js{{ .JSParam }}"></script>
33{{ end }}
34<script>
35function playit(elem, word, wordlist, xid) {
36	import('/wonk.js').then(module => {
37		makeaguess = module.makeaguess
38		module.addguesscontrols(elem, word, wordlist, xid)
39	})
40}
41</script>
42{{ if .LocalJSParam }}
43<script src="/local.js{{ .LocalJSParam }}"></script>
44>>>>>>> 4506960 (import)
45{{ end }}
46</div>
47{{ if and .HonkCSRF (not .IsPreview) }}
48<div class="info" id="refreshbox">
49<<<<<<< HEAD
50<p><button class="refresh">refresh</button><span></span>
51<button class="scrolldown">scroll down</button>
52</div>
53=======
54<p><button onclick="refreshhonks(this)">refresh</button><span></span>
55<button onclick="oldestnewest(this)">scroll down</button>
56</div>
57{{ if eq .ServerMessage "one honk maybe more" }} <script> hideelement("refreshbox")</script> {{ end }}
58>>>>>>> 4506960 (import)
59{{ end }}
60<div id="honksonpage">
61<div>
62{{ $BonkCSRF := .HonkCSRF }}
63{{ $IsPreview := .IsPreview }}
64{{ $MapLink := .MapLink }}
65{{ $Badonk := .User.Options.Reaction }}
66{{ $OmitImages := .User.Options.OmitImages }}
67{{ range .Honks }}
68{{ template "honk.html" map "Honk" . "MapLink" $MapLink "BonkCSRF" $BonkCSRF "IsPreview" $IsPreview "Badonk" $Badonk "OmitImages" $OmitImages }}
69{{ end }}
70</div>
71</div>
72</main>