From ef2611e3c2c07b42f4c8d32ad8cce7d5d634e822 Mon Sep 17 00:00:00 2001 From: tdro Date: Tue, 14 Mar 2023 15:11:23 -0400 Subject: themes/default/layouts/partials/function-paths: Return dict here --- .../default/layouts/_default/_markup/render-codeblock.html | 2 +- themes/default/layouts/_default/_markup/render-image.html | 14 +++++++------- themes/default/layouts/_default/home.xslt.rss.xsl | 6 +++--- themes/default/layouts/_default/home.xslt.sitemap.xsl | 9 +++++---- themes/default/layouts/_default/rss.xml | 6 +++--- themes/default/layouts/_default/section.following.html | 4 ++-- themes/default/layouts/_default/single.html | 4 ++-- themes/default/layouts/partials/author-card.html | 8 ++++---- themes/default/layouts/partials/author-header.html | 6 +++--- themes/default/layouts/partials/author-picture.html | 6 +++--- .../default/layouts/partials/author-section-picture.html | 6 +++--- .../default/layouts/partials/function-fetch-favicons.html | 4 ++-- themes/default/layouts/partials/function-paths.html | 14 +++++++------- themes/default/layouts/partials/meta-anchored.html | 4 ++-- themes/default/layouts/partials/meta-context-menu.html | 6 +++--- themes/default/layouts/partials/meta-date-time.html | 2 +- themes/default/layouts/partials/meta-draft.html | 2 +- themes/default/layouts/partials/meta-expiry-date.html | 2 +- themes/default/layouts/partials/meta-handle.html | 2 +- themes/default/layouts/partials/meta-markdown.html | 4 ++-- themes/default/layouts/partials/meta-permalink.html | 2 +- themes/default/layouts/partials/meta-read-time.html | 2 +- themes/default/layouts/partials/meta-unlisted.html | 2 +- themes/default/layouts/partials/meta-via.html | 2 +- themes/default/layouts/partials/meta-view.html | 2 +- themes/default/layouts/partials/meta-word-count.html | 2 +- themes/default/layouts/partials/navigator-left.html | 2 +- themes/default/layouts/partials/navigator-middle.html | 8 ++++---- themes/default/layouts/partials/pagination.html | 4 ++-- themes/default/layouts/partials/profile.html | 8 ++++---- themes/default/layouts/shortcodes/markdown.html | 2 +- themes/default/layouts/shortcodes/react.html | 6 +++--- themes/default/layouts/shortcodes/react.rss.xml | 6 +++--- 33 files changed, 80 insertions(+), 79 deletions(-) (limited to 'themes') diff --git a/themes/default/layouts/_default/_markup/render-codeblock.html b/themes/default/layouts/_default/_markup/render-codeblock.html index 85e60b2..f18f0d3 100644 --- a/themes/default/layouts/_default/_markup/render-codeblock.html +++ b/themes/default/layouts/_default/_markup/render-codeblock.html @@ -10,7 +10,7 @@ {{ $type }} diff --git a/themes/default/layouts/_default/_markup/render-image.html b/themes/default/layouts/_default/_markup/render-image.html index 1a003fc..b98efdf 100644 --- a/themes/default/layouts/_default/_markup/render-image.html +++ b/themes/default/layouts/_default/_markup/render-image.html @@ -13,7 +13,7 @@ {{- $author := .Page.Section -}} {{- $relURL := strings.TrimPrefix .Page.Site.BaseURL .Page.Permalink -}} {{- $immutable := print ($relURL | humanize | urlize) "-" ($source | sha256 | truncate 8 "") -}} -{{- $fileCache := print (partial "function-paths.html" "media") "/" $author "/" $immutable -}} +{{- $fileCache := print (partial "function-paths.html").media "/" $author "/" $immutable -}} {{- $cached := and (fileExists (print "public/" $fileCache ".webp")) (fileExists (print "public/" $fileCache (path.Ext $source))) -}} {{- if not $cached -}} @@ -22,7 +22,7 @@ {{- if fileExists $public -}} {{- $local = resources.Get $public -}} {{- with $local -}} - {{- $local = .Content | resources.FromString (print (partial "function-paths.html" "media") "/" $author "/" (path.Base .)) -}} + {{- $local = .Content | resources.FromString (print (partial "function-paths.html").media "/" $author "/" (path.Base .)) -}} {{- end -}} {{- $source = print ("" | absURL) $source -}} {{- else -}} @@ -34,20 +34,20 @@ {{- $source = $404image.Permalink -}} {{- end -}} {{- else -}} - {{- $cache = .Content | resources.FromString (print (partial "function-paths.html" "media") "/" $author "/" (path.Base .)) -}} + {{- $cache = .Content | resources.FromString (print (partial "function-paths.html").media "/" $author "/" (path.Base .)) -}} {{- end -}} {{- end -}} {{- else -}} {{- $exists = resources.Get (print "public/" $fileCache (path.Ext $source)) -}} - {{- $exists = $exists.Content | resources.FromString (print (partial "function-paths.html" "media") "/" $author "/" (path.Base $exists)) -}} + {{- $exists = $exists.Content | resources.FromString (print (partial "function-paths.html").media "/" $author "/" (path.Base $exists)) -}} {{- end -}} {{- with $local }} {{- $local = .Fit (print $dimensions " webp") }} - {{- $local = $local | resources.Copy (print (partial "function-paths.html" "media") "/" $author "/" $immutable ".webp") }} + {{- $local = $local | resources.Copy (print (partial "function-paths.html").media "/" $author "/" $immutable ".webp") }} {{- $srcset = $local.Permalink -}} {{- $local = .Fit $dimensions }} - {{- $local = $local | resources.Copy (print (partial "function-paths.html" "media") "/" $author "/" $immutable (path.Ext $local)) }} + {{- $local = $local | resources.Copy (print (partial "function-paths.html").media "/" $author "/" $immutable (path.Ext $local)) }} {{- $width = $local.Width -}} {{- $height = $local.Height -}} {{- $colors = $local.Colors -}} @@ -59,7 +59,7 @@ {{- $cache = $cache | resources.Copy (print $author "/media/" $immutable ".webp") }} {{- $srcset = $cache.Permalink -}} {{- $cache = .Fit $dimensions }} - {{- $cache = $cache | resources.Copy (print (partial "function-paths.html" "media") "/" $author "/" $immutable (path.Ext $cache)) }} + {{- $cache = $cache | resources.Copy (print (partial "function-paths.html").media "/" $author "/" $immutable (path.Ext $cache)) }} {{- $width = $cache.Width -}} {{- $height = $cache.Height -}} {{- $colors = $cache.Colors -}} diff --git a/themes/default/layouts/_default/home.xslt.rss.xsl b/themes/default/layouts/_default/home.xslt.rss.xsl index a19642d..e0c7c80 100644 --- a/themes/default/layouts/_default/home.xslt.rss.xsl +++ b/themes/default/layouts/_default/home.xslt.rss.xsl @@ -33,7 +33,7 @@ / - {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/arrow-left.svg")) }} + {{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/arrow-left.svg")) }} Back @@ -47,7 +47,7 @@ - {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/arrow-right.svg")) }} + {{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/arrow-right.svg")) }} Next @@ -58,7 +58,7 @@ {{ with .Identifier }} - {{ $icon := print (partial "function-paths.html" "static") "/icons/" . ".svg" }} + {{ $icon := print (partial "function-paths.html").static "/icons/" . ".svg" }} {{ safeHTML (readFile $icon) }} {{ end }} {{ delimit (first 1 (split .Name " ")) " " }} diff --git a/themes/default/layouts/_default/home.xslt.sitemap.xsl b/themes/default/layouts/_default/home.xslt.sitemap.xsl index a66877e..ce3fe98 100644 --- a/themes/default/layouts/_default/home.xslt.sitemap.xsl +++ b/themes/default/layouts/_default/home.xslt.sitemap.xsl @@ -21,7 +21,7 @@