From 6a583db0ac533d88f551fbe4d15a10f4b038da98 Mon Sep 17 00:00:00 2001 From: Oscar Najera Date: Sat, 21 Oct 2023 19:09:25 +0200 Subject: Hero avoid duplication --- layouts/partials/hero.html | 44 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) (limited to 'layouts/partials/hero.html') 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 @@
-
-

{{ .Title }}

- {{ .Content }} +
+ {{ 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 }} + + {{ end }} +

+ {{ .Title }} +

+ + {{ with .Params.Subtitle }} +

+ {{ . | markdownify }} +

+ {{ end }} + + +
+ {{ if .Params.personal }} + {{ partial "social_links" .Site.Author }} + {{ else }} + {{ partial "social_links" .Site.Params }} + {{ end }} +
+ {{ else }} + +

{{ .Title }}

+ {{ .Content }} + {{ end }}
-- cgit v1.2.3