From f0cbdec755e91fc3f02e96b03e1fc200b135815e Mon Sep 17 00:00:00 2001 From: tdro Date: Sat, 8 Apr 2023 14:35:37 -0400 Subject: static/js: Add update check In the case of heavy caching attempt a naive site update check with voluntary refresh. Not fully idempotent? --- themes/default/layouts/partials/base-head.html | 23 ++++++++------ .../default/layouts/partials/navigator-middle.html | 37 ++++++++++++++-------- 2 files changed, 36 insertions(+), 24 deletions(-) (limited to 'themes') diff --git a/themes/default/layouts/partials/base-head.html b/themes/default/layouts/partials/base-head.html index 9decdac..acedcf0 100644 --- a/themes/default/layouts/partials/base-head.html +++ b/themes/default/layouts/partials/base-head.html @@ -7,20 +7,18 @@ {{- $author := partial "function-authors-data.html" (dict "Data" $authorData) -}} +{{- $noindex := "" -}} +{{- if or .Params.Feed .Params.Unlisted .Params.ExpiryDate -}} + {{- $noindex = "noindex,nofollow" -}} +{{- end }} + -{{ if or .Params.Feed .Params.Unlisted .Params.ExpiryDate -}} - -{{- else -}} - -{{- end }} + -{{ with .Site.Params.site.refresh -}} - -{{- end }} @@ -42,12 +40,17 @@ - -{{- partial "base-search.html" . -}} + + + + + +{{- partial "base-search.html" . -}} + {{- partial "base-discovery.html" . -}} diff --git a/themes/default/layouts/partials/navigator-middle.html b/themes/default/layouts/partials/navigator-middle.html index 46c4060..688963a 100644 --- a/themes/default/layouts/partials/navigator-middle.html +++ b/themes/default/layouts/partials/navigator-middle.html @@ -1,22 +1,28 @@ -{{ $id := .Id }} -{{ $href := .Href }} +{{- $id := .Id -}} +{{- $href := .Href -}} +{{- $icon := readFile (print (partial "function-paths.html").static "/icons/feather/arrow-up.svg") -}} +{{- $refresh := readFile (print (partial "function-paths.html").static "/icons/feather/refresh-cw.svg") -}} +{{- $label := "Top" -}} + +{{- with .Icon -}} + {{- $icon = readFile (print (partial "function-paths.html").static "/icons/feather/" . ".svg") -}} +{{- end -}} + +{{- with .IconLabel -}} + {{- $label = . -}} +{{- end -}} - + + + -- cgit v1.2.3