From f5d23c9b411379ba64fbf957404c9af0db919af6 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Tue, 28 Jun 2022 22:33:10 -0500 Subject: [PATCH] Extract scrolling header to its own file and remove from single pages --- assets/styles/main.css | 2 +- content/_index.html | 1 + layouts/_default/baseof.html | 31 +++++--------------- layouts/_default/list.html | 11 +++++++ layouts/academia/list.html | 10 +++++++ layouts/partials/scrolling-image-header.html | 20 +++++++++++++ layouts/videos/list.html | 14 +++++++++ layouts/videos/single.html | 15 +++++++++- layouts/websites/list.html | 19 ++++++++++++ 9 files changed, 97 insertions(+), 26 deletions(-) create mode 100644 layouts/_default/list.html create mode 100644 layouts/partials/scrolling-image-header.html diff --git a/assets/styles/main.css b/assets/styles/main.css index d4c06f6..40973e3 100644 --- a/assets/styles/main.css +++ b/assets/styles/main.css @@ -41,7 +41,7 @@ opacity: 0; } -main { +.list-main { position: relative; background-color: #fff; } diff --git a/content/_index.html b/content/_index.html index 6dcd67a..802522b 100644 --- a/content/_index.html +++ b/content/_index.html @@ -3,6 +3,7 @@ title: Home cardImage: charolette motto: My name is Thomas Christensen
I am Milliron X description: The homepage of Thomas A. Christensen II +layout: _default/list ---

What is a "Milliron X"?

diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index ea3e4b2..4c1067d 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -89,7 +89,7 @@ -
+

@@ -100,31 +100,14 @@

-
-
-

- {{ safeHTML (.Param "motto") }} -

-
- {{ $imgsrc := print "images/" (.Param "cardImage") ".jpg" }} - {{ $mainimg := resources.Get $imgsrc }} - {{ $blurimg := $mainimg.Filter (images.GaussianBlur 100) }} -
-
-
-
-
+ {{ block "main" . }} +
- {{ block "main" . }}{{ end }} + {{ .Content }}
-
-
+ + {{ end }} + {{ $fajs := resources.Get "scripts/fontawesome/all.min.js" }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..6761a52 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,11 @@ + +{{ define "main" }} +{{ partial "scrolling-image-header" . }} +
+
+ {{ block "content" . }} + {{ .Content }} + {{ end }} +
+
+{{ end }} diff --git a/layouts/academia/list.html b/layouts/academia/list.html index 9a1dba6..39b1f57 100644 --- a/layouts/academia/list.html +++ b/layouts/academia/list.html @@ -1,4 +1,10 @@ {{ define "main" }} + {{ partial "scrolling-image-header" . }} +
+
+ + +

Selected Presentations

{{ $featuredpubs := where .Pages ".Params.featured" "==" true }} {{ range $featuredpubs }} @@ -11,4 +17,8 @@ {{ range $nonfeaturedpubs }} {{ partial "academia/list-single.html" . }} {{ end }} + + +
+
{{ end }} diff --git a/layouts/partials/scrolling-image-header.html b/layouts/partials/scrolling-image-header.html new file mode 100644 index 0000000..f20bc75 --- /dev/null +++ b/layouts/partials/scrolling-image-header.html @@ -0,0 +1,20 @@ +{{ $millironx := resources.Get "graphics/millironx.svg" }} +
+
+

+ {{ safeHTML (.Param "motto") }} +

+
+ {{ $imgsrc := print "images/" (.Param "cardImage") ".jpg" }} + {{ $mainimg := resources.Get $imgsrc }} + {{ $blurimg := $mainimg.Filter (images.GaussianBlur 100) }} +
+
+
+
diff --git a/layouts/videos/list.html b/layouts/videos/list.html index 56bb374..92ec14d 100644 --- a/layouts/videos/list.html +++ b/layouts/videos/list.html @@ -1,7 +1,14 @@ {{ define "main" }} + {{ partial "scrolling-image-header" . }} + + +
+
+ {{ .Content }} +
{{ range .Pages }}
@@ -16,4 +23,11 @@
{{ end }}
+ + + +
+
+ + {{ end }} diff --git a/layouts/videos/single.html b/layouts/videos/single.html index 85bc3a1..8f31c97 100644 --- a/layouts/videos/single.html +++ b/layouts/videos/single.html @@ -1,6 +1,9 @@ {{ define "main" }} - {{ if eq .Params.storage "yt" }} +
+
+ + {{ if eq .Params.storage "yt" }} {{ .Scratch.Set "embedLink" (print "https://www.youtube-nocookie.com/embed/" .Params.storageId) }} {{ end }} {{ if eq .Params.storage "vimeo" }} @@ -23,4 +26,14 @@
{{ .Content }} + + + + + + + + +
+ {{ end }} diff --git a/layouts/websites/list.html b/layouts/websites/list.html index d9ff1c6..01fa73c 100644 --- a/layouts/websites/list.html +++ b/layouts/websites/list.html @@ -1,4 +1,12 @@ {{ define "main" }} +{{ partial "scrolling-image-header" . }} + +
+
+ + + + {{ range .Pages }}
@@ -27,4 +35,15 @@
{{ end }} + + + + + + +
+
+ + + {{ end }}