all repos — honk @ v1.3.1

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<div>
 6{{ if .Name }}
 7<p>{{ .Name }} <span class="left1em"><a href="/u/{{ .Name }}/rss">rss</a></span>
 8<p>{{ .WhatAbout }}
 9{{ end }}
10{{ .ServerMessage }}
11</div>
12</div>
13{{ if .HonkCSRF }}
14{{ template "honkform.html" . }}
15<script src="/honkpage.js{{ .JSParam }}" defer data-csrf="{{ .HonkCSRF }}" data-pagename="{{ .PageName }}" data-pagearg="{{ .PageArg }}" data-tophid="{{ .TopHID }}" data-srvmsg="{{ .ServerMessage }}"></script>
16{{ end }}
17{{ if .LocalJSParam }}
18<script src="/local.js{{ .LocalJSParam }}" defer></script>
19{{ end }}
20</div>
21{{ if and .HonkCSRF (not .IsPreview) }}
22<div class="info" id="refreshbox">
23<p><button id="honkrefresher" class="refresh">refresh</button><span></span>
24<button id="newerscroller" class="scrolldown">scroll down</button>
25</div>
26{{ end }}
27<div id="honksonpage">
28<div>
29{{ $BonkCSRF := .HonkCSRF }}
30{{ $IsPreview := .IsPreview }}
31{{ $MapLink := .MapLink }}
32{{ $Badonk := .User.Options.Reaction }}
33{{ $OmitImages := .User.Options.OmitImages }}
34{{ $UserURL := .User.URL }}
35{{ range .Honks }}
36{{ template "honk.html" map "Honk" . "MapLink" $MapLink "BonkCSRF" $BonkCSRF "IsPreview" $IsPreview "Badonk" $Badonk "OmitImages" $OmitImages "UserURL" $UserURL }}
37{{ end }}
38</div>
39</div>
40</main>