Extract scrolling header to its own file and remove from single pages
This commit is contained in:
parent
f5bf7bd9b4
commit
f5d23c9b41
9 changed files with 97 additions and 26 deletions
|
@ -41,7 +41,7 @@
|
|||
opacity: 0;
|
||||
}
|
||||
|
||||
main {
|
||||
.list-main {
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ title: Home
|
|||
cardImage: charolette
|
||||
motto: <small>My name is Thomas Christensen</small><br />I am Milliron X
|
||||
description: The homepage of Thomas A. Christensen II
|
||||
layout: _default/list
|
||||
---
|
||||
|
||||
<h2>What is a "Milliron X"?</h2>
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
</div>
|
||||
</nav>
|
||||
</aside>
|
||||
<div class="col bg-faded py-3 gx-0">
|
||||
<main class="col bg-faded py-3 gx-0">
|
||||
<div class="container">
|
||||
<header class="d-none d-sm-none d-md-block text-center">
|
||||
<h1 class="font-serif font-small-caps">
|
||||
|
@ -100,33 +100,16 @@
|
|||
</h1>
|
||||
</header>
|
||||
</div>
|
||||
<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 />
|
||||
<main class="container-fluid">
|
||||
{{ block "main" . }}
|
||||
<section class="container-fluid list-main">
|
||||
<div class="container px-5">
|
||||
{{ block "main" . }}{{ end }}
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ $fajs := resources.Get "scripts/fontawesome/all.min.js" }}
|
||||
{{ $jqueryjs := resources.Get "scripts/jquery/jquery.min.js" }}
|
||||
{{ $popperjs := resources.Get "scripts/popper/popper.min.js" }}
|
||||
|
|
11
layouts/_default/list.html
Normal file
11
layouts/_default/list.html
Normal 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 }}
|
|
@ -1,4 +1,10 @@
|
|||
{{ define "main" }}
|
||||
{{ partial "scrolling-image-header" . }}
|
||||
<section class="container-fluid list-main">
|
||||
<div class="container px-5">
|
||||
|
||||
|
||||
|
||||
<h2>Selected Presentations</h2>
|
||||
{{ $featuredpubs := where .Pages ".Params.featured" "==" true }}
|
||||
{{ range $featuredpubs }}
|
||||
|
@ -11,4 +17,8 @@
|
|||
{{ range $nonfeaturedpubs }}
|
||||
{{ partial "academia/list-single.html" . }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
|
20
layouts/partials/scrolling-image-header.html
Normal file
20
layouts/partials/scrolling-image-header.html
Normal 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 />
|
|
@ -1,7 +1,14 @@
|
|||
{{ define "main" }}
|
||||
{{ partial "scrolling-image-header" . }}
|
||||
|
||||
|
||||
<section class="container-fluid list-main">
|
||||
<div class="container px-5">
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
{{ range .Pages }}
|
||||
<div class="col-sm-4">
|
||||
|
@ -16,4 +23,11 @@
|
|||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
{{ end }}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
{{ define "main" }}
|
||||
|
||||
<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) }}
|
||||
{{ end }}
|
||||
|
@ -23,4 +26,14 @@
|
|||
</div>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{ end }}
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
{{ define "main" }}
|
||||
{{ partial "scrolling-image-header" . }}
|
||||
|
||||
<section class="container-fluid list-main">
|
||||
<div class="container px-5">
|
||||
|
||||
|
||||
|
||||
|
||||
{{ range .Pages }}
|
||||
<section class="card mb-3">
|
||||
<div class="card-body d-flex align-items-center">
|
||||
|
@ -27,4 +35,15 @@
|
|||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue