From 030776d52bfe234a212f3a737d91a1716b2867c5 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 2 Oct 2021 11:19:42 -0700 Subject: [PATCH] Move the head and header partials from the theme to the site layouts/ --- layouts/partials/head.html | 78 ++++++++++++++++++++++++++++++++++++ layouts/partials/header.html | 51 +++++++++++++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 layouts/partials/head.html create mode 100644 layouts/partials/header.html diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..8d9ea0d --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,78 @@ + + + + + + + {{ if not .IsHome }}{{ .Title }} - {{ end }}{{ site.Title }} + + + {{ if eq .Kind "page" }} + + + {{ else }} + + + {{ end }} + + + {{ $app_css := resources.Get "app.css" }} + + {{ $custom_css := resources.Get "custom.css" }} + + {{ $css := slice $app_css $custom_css | resources.Concat "app.css" | minify }} + + + {{ if .IsHome }} + {{ $home_css := resources.Get "home.css" }} + + {{ end }} + + {{ if and .IsPage (not site.Params.disableHLJS) }} + + + {{ end }} + + + + + {{ range $.Scratch.Get "social-list" }} + + {{ end }} + + + + + + + {{ hugo.Generator }} + + + {{ range .AlternativeOutputFormats }} + + {{ end }} + + + {{ if or hugo.IsProduction (eq site.Params.env "production") }} + + {{ template "_internal/google_analytics_async.html" . }} + + {{ template "_internal/google_news.html" . }} + + {{ template "_internal/opengraph.html" . }} + + {{ template "_internal/schema.html" . }} + + {{ template "_internal/twitter_cards.html" . }} + + {{ end }} + diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..6c42ebf --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,51 @@ +
+ {{ if .IsHome }} +

+ {{ site.Title }} +

+ {{ else }} + + {{ end }} + + + + {{ $url := .RelPermalink }} + {{ with site.Menus.main }} + + {{ end }} + + {{ with $.Scratch.Get "social-list" }} + + {{ end }} +