From afc135dd10af909d526f66b85b6af260f4bdcfa6 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Fri, 12 Jul 2024 17:04:05 -0700 Subject: [PATCH] Add page-footer.html --- layouts/partials/paige/page-footer.html | 56 +++++++++++++++++++++++++ layouts/partials/paige/page.html | 2 + layouts/partials/paige/site-footer.html | 44 ------------------- 3 files changed, 58 insertions(+), 44 deletions(-) create mode 100644 layouts/partials/paige/page-footer.html diff --git a/layouts/partials/paige/page-footer.html b/layouts/partials/paige/page-footer.html new file mode 100644 index 00000000..a970ae41 --- /dev/null +++ b/layouts/partials/paige/page-footer.html @@ -0,0 +1,56 @@ +{{ $page := . }} + +{{ $fileediturl := $page.Param "paige.file_edit_url" }} +{{ $filehistoryurl := $page.Param "paige.file_history_url" }} + +{{ if $page.File }} + {{ if $fileediturl }} + {{ $fileediturl = printf $fileediturl $page.File.Path }} + {{ end }} + + {{ if $filehistoryurl }} + {{ $filehistoryurl = printf $filehistoryurl $page.File.Path }} + {{ end }} +{{ end }} + + diff --git a/layouts/partials/paige/page.html b/layouts/partials/paige/page.html index 55448c2a..9a8f0050 100644 --- a/layouts/partials/paige/page.html +++ b/layouts/partials/paige/page.html @@ -50,5 +50,7 @@ {{ with $content }}
{{ . | safeHTML }}
{{ end }} + + {{ partial "paige/page-footer.html" $page }} diff --git a/layouts/partials/paige/site-footer.html b/layouts/partials/paige/site-footer.html index d69c840a..45276250 100644 --- a/layouts/partials/paige/site-footer.html +++ b/layouts/partials/paige/site-footer.html @@ -3,8 +3,6 @@ {{ $copyright := site.Copyright | markdownify }} {{ $credit := $page.Param "paige.credit" }} {{ $theme := "https://github.com/willfaught/paige" }} -{{ $fileediturl := $page.Param "paige.file_edit_url" }} -{{ $filehistoryurl := $page.Param "paige.file_history_url" }} {{ $license := $page.Param "paige.license" | markdownify }} {{ $target := partial "paige/target.html" (dict "page" $page "url" $theme) }} @@ -15,53 +13,11 @@ {{ $credit = markdownify $credit }} {{ end }} -{{ if $page.File }} - {{ if $fileediturl }} - {{ $fileediturl = printf $fileediturl $page.File.Path }} - {{ end }} - - {{ if $filehistoryurl }} - {{ $filehistoryurl = printf $filehistoryurl $page.File.Path }} - {{ end }} -{{ end }} -