From f5c386cdead45272bcdbccdff05cfe66c2c72168 Mon Sep 17 00:00:00 2001 From: eagleusb Date: Sat, 13 May 2023 00:48:12 +0200 Subject: [PATCH] feat(layouts) update header and footer regarding theme, call feather replace method --- layouts/partials/extended_footer.html | 1 + layouts/partials/extended_head.html | 1 + layouts/partials/footer.html | 13 +++-- layouts/partials/head.html | 70 --------------------------- 4 files changed, 11 insertions(+), 74 deletions(-) create mode 100644 layouts/partials/extended_footer.html create mode 100644 layouts/partials/extended_head.html delete mode 100644 layouts/partials/head.html diff --git a/layouts/partials/extended_footer.html b/layouts/partials/extended_footer.html new file mode 100644 index 0000000..c97a72e --- /dev/null +++ b/layouts/partials/extended_footer.html @@ -0,0 +1 @@ + diff --git a/layouts/partials/extended_head.html b/layouts/partials/extended_head.html new file mode 100644 index 0000000..5a87ae5 --- /dev/null +++ b/layouts/partials/extended_head.html @@ -0,0 +1 @@ + diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index a7d56d4..416ca8e 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -14,7 +14,12 @@ - - - - +{{ $menu := resources.Get "js/menu.js" | js.Build }} +{{ $prism := resources.Get "js/prism.js" | js.Build }} +{{ $bundle := slice $menu $prism | resources.Concat "bundle.js" | resources.Minify }} + + + + + +{{ partial "extended_footer.html" . }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html deleted file mode 100644 index 5c01a82..0000000 --- a/layouts/partials/head.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - -{{ if (isset .Params "color") }} - -{{ else if (ne $.Site.Params.ThemeColor "orange") }} - -{{ end }} - - -{{ if (fileExists "static/style.css") -}} - -{{- end }} - - - -{{ if isset $.Site.Params "favicon" }} - -{{ else }} - -{{ end }} - - - -{{ if (isset $.Site.Params.Twitter "site") }} - -{{ end }} - - - - - - - - - -{{ if and (not .IsHome) (isset .Params "cover") }} - -{{ else }} - {{ if isset $.Site.Params "favicon" }} - - {{ else }} - - {{ end }} -{{ end }} - - -{{ range .Params.categories }} - -{{ end }} -{{ if isset .Params "date" }} - -{{ end }} - - -{{ with .OutputFormats.Get "RSS" }} - -{{ end }} - - -{{ with .OutputFormats.Get "json" }} - -{{ end }} - -