aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/partials/hero.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/hero.html')
-rw-r--r--layouts/partials/hero.html44
1 files changed, 38 insertions, 6 deletions
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>