all repos — honk @ 27b441492bbec6d30a969f4f18aac70140880d14

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 }}" }
27console.log(curpagestate)
28var tophid = { }
29tophid[curpagestate.name + ":" + curpagestate.arg] = "{{ .TopHID }}"
30var servermsgs = { }
31servermsgs[curpagestate.name + ":" + curpagestate.arg] = "{{ .ServerMessage }}"
32</script>
33<script src="/honkpage.js{{ .JSParam }}"></script>
34{{ end }}
35<script>
36function playit(elem, word, wordlist, xid) {
37	import('/wonk.js').then(module => {
38		makeaguess = module.makeaguess
39		module.addguesscontrols(elem, word, wordlist, xid)
40	})
41}
42</script>
43{{ if .LocalJSParam }}
44<script src="/local.js{{ .LocalJSParam }}"></script>
45>>>>>>> 4506960 (import)
46{{ end }}
47</div>
48{{ if and .HonkCSRF (not .IsPreview) }}
49<div class="info" id="refreshbox">
50<<<<<<< HEAD
51<p><button class="refresh">refresh</button><span></span>
52<button class="scrolldown">scroll down</button>
53</div>
54=======
55<p><button onclick="refreshhonks(this)">refresh</button><span></span>
56<button onclick="oldestnewest(this)">scroll down</button>
57</div>
58{{ if eq .ServerMessage "one honk maybe more" }} <script> hideelement("refreshbox")</script> {{ end }}
59>>>>>>> 4506960 (import)
60{{ end }}
61<div id="honksonpage">
62<div>
63{{ $BonkCSRF := .HonkCSRF }}
64{{ $IsPreview := .IsPreview }}
65{{ $MapLink := .MapLink }}
66{{ $Badonk := .User.Options.Reaction }}
67{{ $OmitImages := .User.Options.OmitImages }}
68{{ range .Honks }}
69{{ template "honk.html" map "Honk" . "MapLink" $MapLink "BonkCSRF" $BonkCSRF "IsPreview" $IsPreview "Badonk" $Badonk "OmitImages" $OmitImages }}
70{{ end }}
71</div>
72</div>
73</main>