Extract scrolling header to its own file and remove from single pages

This commit is contained in:
Thomas A. Christensen II 2022-06-28 22:33:10 -05:00
parent f5bf7bd9b4
commit f5d23c9b41
Signed by: millironx
GPG key ID: 139C07724802BC5D
9 changed files with 97 additions and 26 deletions

View file

@ -41,7 +41,7 @@
opacity: 0; opacity: 0;
} }
main { .list-main {
position: relative; position: relative;
background-color: #fff; background-color: #fff;
} }

View file

@ -3,6 +3,7 @@ title: Home
cardImage: charolette cardImage: charolette
motto: <small>My name is Thomas Christensen</small><br />I am Milliron X motto: <small>My name is Thomas Christensen</small><br />I am Milliron X
description: The homepage of Thomas A. Christensen II description: The homepage of Thomas A. Christensen II
layout: _default/list
--- ---
<h2>What is a "Milliron X"?</h2> <h2>What is a "Milliron X"?</h2>

View file

@ -89,7 +89,7 @@
</div> </div>
</nav> </nav>
</aside> </aside>
<div class="col bg-faded py-3 gx-0"> <main class="col bg-faded py-3 gx-0">
<div class="container"> <div class="container">
<header class="d-none d-sm-none d-md-block text-center"> <header class="d-none d-sm-none d-md-block text-center">
<h1 class="font-serif font-small-caps"> <h1 class="font-serif font-small-caps">
@ -100,31 +100,14 @@
</h1> </h1>
</header> </header>
</div> </div>
<div class="blurred-container"> {{ block "main" . }}
<div class="motto"> <section class="container-fluid list-main">
<h1 id="motto">
{{ safeHTML (.Param "motto") }}
</h1>
</div>
{{ $imgsrc := print "images/" (.Param "cardImage") ".jpg" }}
{{ $mainimg := resources.Get $imgsrc }}
{{ $blurimg := $mainimg.Filter (images.GaussianBlur 100) }}
<div
class="img-src"
style="background-image: url('{{ $mainimg.RelPermalink }}');"
></div>
<div
class="img-src blur"
style="background-image: url('{{ $blurimg.RelPermalink }}');"
></div>
</div>
<br />
<main class="container-fluid">
<div class="container px-5"> <div class="container px-5">
{{ block "main" . }}{{ end }} {{ .Content }}
</div> </div>
</main> </section>
</div> {{ end }}
</main>
</div> </div>
</div> </div>
{{ $fajs := resources.Get "scripts/fontawesome/all.min.js" }} {{ $fajs := resources.Get "scripts/fontawesome/all.min.js" }}

View file

@ -0,0 +1,11 @@
{{ define "main" }}
{{ partial "scrolling-image-header" . }}
<section class="container-fluid list-main">
<div class="container px-5">
{{ block "content" . }}
{{ .Content }}
{{ end }}
</div>
</section>
{{ end }}

View file

@ -1,4 +1,10 @@
{{ define "main" }} {{ define "main" }}
{{ partial "scrolling-image-header" . }}
<section class="container-fluid list-main">
<div class="container px-5">
<h2>Selected Presentations</h2> <h2>Selected Presentations</h2>
{{ $featuredpubs := where .Pages ".Params.featured" "==" true }} {{ $featuredpubs := where .Pages ".Params.featured" "==" true }}
{{ range $featuredpubs }} {{ range $featuredpubs }}
@ -11,4 +17,8 @@
{{ range $nonfeaturedpubs }} {{ range $nonfeaturedpubs }}
{{ partial "academia/list-single.html" . }} {{ partial "academia/list-single.html" . }}
{{ end }} {{ end }}
</div>
</section>
{{ end }} {{ end }}

View file

@ -0,0 +1,20 @@
{{ $millironx := resources.Get "graphics/millironx.svg" }}
<div class="blurred-container">
<div class="motto">
<h1 id="motto">
{{ safeHTML (.Param "motto") }}
</h1>
</div>
{{ $imgsrc := print "images/" (.Param "cardImage") ".jpg" }}
{{ $mainimg := resources.Get $imgsrc }}
{{ $blurimg := $mainimg.Filter (images.GaussianBlur 100) }}
<div
class="img-src"
style="background-image: url('{{ $mainimg.RelPermalink }}');"
></div>
<div
class="img-src blur"
style="background-image: url('{{ $blurimg.RelPermalink }}');"
></div>
</div>
<br />

View file

@ -1,7 +1,14 @@
{{ define "main" }} {{ define "main" }}
{{ partial "scrolling-image-header" . }}
<section class="container-fluid list-main">
<div class="container px-5">
{{ .Content }} {{ .Content }}
<div class="row"> <div class="row">
{{ range .Pages }} {{ range .Pages }}
<div class="col-sm-4"> <div class="col-sm-4">
@ -16,4 +23,11 @@
</div> </div>
{{ end }} {{ end }}
</div> </div>
</div>
</section>
{{ end }} {{ end }}

View file

@ -1,6 +1,9 @@
{{ define "main" }} {{ define "main" }}
{{ if eq .Params.storage "yt" }} <section class="container-fluid list-main">
<div class="container px-5">
{{ if eq .Params.storage "yt" }}
{{ .Scratch.Set "embedLink" (print "https://www.youtube-nocookie.com/embed/" .Params.storageId) }} {{ .Scratch.Set "embedLink" (print "https://www.youtube-nocookie.com/embed/" .Params.storageId) }}
{{ end }} {{ end }}
{{ if eq .Params.storage "vimeo" }} {{ if eq .Params.storage "vimeo" }}
@ -23,4 +26,14 @@
</div> </div>
{{ .Content }} {{ .Content }}
</div>
</section>
{{ end }} {{ end }}

View file

@ -1,4 +1,12 @@
{{ define "main" }} {{ define "main" }}
{{ partial "scrolling-image-header" . }}
<section class="container-fluid list-main">
<div class="container px-5">
{{ range .Pages }} {{ range .Pages }}
<section class="card mb-3"> <section class="card mb-3">
<div class="card-body d-flex align-items-center"> <div class="card-body d-flex align-items-center">
@ -27,4 +35,15 @@
</div> </div>
</section> </section>
{{ end }} {{ end }}
</div>
</section>
{{ end }} {{ end }}