move scripting up so it's available on partially loaded pages
Ted Unangst tedu@tedunangst.com
Wed, 29 Jan 2020 21:06:47 -0500
1 files changed,
11 insertions(+),
11 deletions(-)
jump to
M
views/honkpage.html
→
views/honkpage.html
@@ -18,17 +18,6 @@ <p><button onclick="refreshhonks(this)">refresh</button><span></span>
<button onclick="oldestnewest(this)">scroll down</button> </div> {{ end }} -<div id="honksonpage"> -<div> -{{ $BonkCSRF := .HonkCSRF }} -{{ $IsPreview := .IsPreview }} -{{ $MapLink := .MapLink }} -{{ range .Honks }} -{{ template "honk.html" map "Honk" . "MapLink" $MapLink "BonkCSRF" $BonkCSRF "IsPreview" $IsPreview }} -{{ end }} -</div> -</div> -</main> {{ if .HonkCSRF }} <script> var csrftoken = {{ .HonkCSRF }}@@ -42,3 +31,14 @@
</script> <script src="/honkpage.js{{ .JSParam }}"></script> {{ end }} +<div id="honksonpage"> +<div> +{{ $BonkCSRF := .HonkCSRF }} +{{ $IsPreview := .IsPreview }} +{{ $MapLink := .MapLink }} +{{ range .Honks }} +{{ template "honk.html" map "Honk" . "MapLink" $MapLink "BonkCSRF" $BonkCSRF "IsPreview" $IsPreview }} +{{ end }} +</div> +</div> +</main>