aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--layouts/_default/about.html37
-rw-r--r--layouts/partials/hero.html44
2 files changed, 39 insertions, 42 deletions
diff --git a/layouts/_default/about.html b/layouts/_default/about.html
index 3aaa361..a88a9b1 100644
--- a/layouts/_default/about.html
+++ b/layouts/_default/about.html
@@ -1,40 +1,5 @@
{{ define "hero" }}
- <div
- style="background: linear-gradient( rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.15) ){{ with resources.Get (index .Params.images 0) }}
- , url('{{ .RelPermalink }}')
- {{ end }}; background-position: center;"
- class="pv5"
- >
- <div id="hero" class="mw7 center ph2 near-white lh-copy tc">
- {{ $avatar := index .Params.images 1 }}
- {{ if hasPrefix $avatar "http" }}
- {{ $avatar = resources.GetRemote $avatar }}
- {{ else }}
- {{ $avatar = resources.Get $avatar }}
- {{ end }}
- {{ with $avatar }}
- <img src="{{ .RelPermalink }}" class="br-100 w5" />
- {{ end }}
- <h1 class="f1 mv1">
- {{ .Title }}
- </h1>
-
- {{ with .Params.Subtitle }}
- <h2 class="f3 fw3 mv1">
- {{ . | markdownify }}
- </h2>
- {{ end }}
-
-
- <div class="f2 mt3">
- {{ if .Params.personal }}
- {{ partial "social_links" .Site.Author }}
- {{ else }}
- {{ partial "social_links" .Site.Params }}
- {{ end }}
- </div>
- </div>
- </div>
+ {{ partial "hero.html" . }}
{{ end }}
{{ define "main" }}
diff --git a/layouts/partials/hero.html b/layouts/partials/hero.html
index 5acafde..93edc74 100644
--- a/layouts/partials/hero.html
+++ b/layouts/partials/hero.html
@@ -1,11 +1,43 @@
<div
- style="background: linear-gradient( rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.15) ){{ with resources.Get (index .Params.images 0) }}
- , url('{{ .RelPermalink }}')
- {{ end }}; background-position: center;"
+ id="hero"
class="pv5"
+ style="background: linear-gradient( rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.15) ){{ with resources.Get (index .Params.images 0) }}
+ , url('{{ .RelPermalink }}') center
+ {{ end }};"
>
- <div id="hero" class="mw7 center ph2 near-white lh-copy">
- <h1 class="f1 tc title berkshire-swash">{{ .Title }}</h1>
- {{ .Content }}
+ <div class="mw7 center ph2 near-white lh-copy">
+ {{ if eq .Type "about" }}
+ {{ $avatar := index .Params.images 1 }}
+ {{ if hasPrefix $avatar "http" }}
+ {{ $avatar = resources.GetRemote $avatar }}
+ {{ else }}
+ {{ $avatar = resources.Get $avatar }}
+ {{ end }}
+ {{ with $avatar }}
+ <img src="{{ .RelPermalink }}" class="br-100 w5 db center" />
+ {{ end }}
+ <h1 class="f1 tc mv1">
+ {{ .Title }}
+ </h1>
+
+ {{ with .Params.Subtitle }}
+ <h2 class="f3 tc fw3 mv1">
+ {{ . | markdownify }}
+ </h2>
+ {{ end }}
+
+
+ <div class="f2 mt3 tc">
+ {{ if .Params.personal }}
+ {{ partial "social_links" .Site.Author }}
+ {{ else }}
+ {{ partial "social_links" .Site.Params }}
+ {{ end }}
+ </div>
+ {{ else }}
+
+ <h1 class="f1 tc berkshire-swash">{{ .Title }}</h1>
+ {{ .Content }}
+ {{ end }}
</div>
</div>