diff options
author | Miquel Lionel <lionelmiquel@sfr.fr> | 2021-02-17 13:48:13 +0100 |
---|---|---|
committer | Miquel Lionel <lionel@les-miquelots.net> | 2021-02-17 13:48:13 +0100 |
commit | 2430bf57c22948e66b2c918d324d6e0bff4f6792 (patch) | |
tree | 0d79e5d8b5780d6c8d625de50d784a7da3a2a26b /v0.9.5/views/i18n/honkpage.html | |
parent | 19cfd918aa30f316754b118278fc6853d7b8e04b (diff) | |
download | honk_custom-2430bf57c22948e66b2c918d324d6e0bff4f6792.tar.gz honk_custom-2430bf57c22948e66b2c918d324d6e0bff4f6792.zip |
add i18n'd html templates, newer patch for web.go
Diffstat (limited to 'v0.9.5/views/i18n/honkpage.html')
-rw-r--r-- | v0.9.5/views/i18n/honkpage.html | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/v0.9.5/views/i18n/honkpage.html b/v0.9.5/views/i18n/honkpage.html new file mode 100644 index 0000000..0ae42ef --- /dev/null +++ b/v0.9.5/views/i18n/honkpage.html @@ -0,0 +1,45 @@ +{{ template "header.html" . }} +<main> +<div class="info" id="infobox"> +<div id="srvmsg"> +{{ if .Name }} +<p>{{ .Name }} <span style="margin-left:1em;"><a href="/u/{{ .Name }}/rss">rss</a></span> +<p>{{ .WhatAbout }} +{{ end }} +<p>{{ .ServerMessage }} +</div> +{{ if .HonkCSRF }} +{{ template "honkform.html" . }} +<script> +var csrftoken = {{ .HonkCSRF }} +var honksforpage = { } +var curpagestate = { name: "{{ .PageName }}", arg : "{{ .PageArg }}" } +var tophid = { } +tophid[curpagestate.name + ":" + curpagestate.arg] = "{{ .TopHID }}" +var servermsgs = { } +servermsgs[curpagestate.name + ":" + curpagestate.arg] = "{{ .ServerMessage }}" +</script> +<script src="/honkpage.js{{ .JSParam }}"></script> +{{ end }} +</div> +{{ if and .HonkCSRF (not .IsPreview) }} +<div class="info" id="refreshbox"> +<p><button onclick="refreshhonks(this)">{{ .i18n.Refresh }}</button><span></span> +<button onclick="oldestnewest(this)">{{ .i18n.ScrollDown }}</button> +</div> +{{ if eq .ServerMessage .i18n.MoarHonks }} <script> hideelement("refreshbox")</script> {{ end }} +{{ end }} +<div id="honksonpage"> +<div> +{{ $BonkCSRF := .HonkCSRF }} +{{ $IsPreview := .IsPreview }} +{{ $MapLink := .MapLink }} +{{ $Badonk := .User.Options.Reaction }} +{{ $i18n := .i18n }} +{{ $OmitImages := .User.Options.OmitImages }} +{{ range .Honks }} +{{ template "honk.html" map "Honk" . "MapLink" $MapLink "BonkCSRF" $BonkCSRF "IsPreview" $IsPreview "Badonk" $Badonk "OmitImages" $OmitImages "i18n" $i18n }} +{{ end }} +</div> +</div> +</main> |