From c7cea43cc00ea4cdddfb09466eca268dc3b7a972 Mon Sep 17 00:00:00 2001 From: Oscar Najera Date: Tue, 17 Oct 2023 03:42:49 +0200 Subject: About page compatible with personal and project --- layouts/_default/about.html | 31 ++++++++++++++++++++++++++----- layouts/partials/social_links.html | 4 ++-- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/layouts/_default/about.html b/layouts/_default/about.html index 99eb93a..e69e671 100644 --- a/layouts/_default/about.html +++ b/layouts/_default/about.html @@ -6,11 +6,32 @@ class="pv5" >
- -

{{ .Site.Author.name }}

-

{{ .Site.Author.role }}

-
- {{ partial "social_links" . }} + {{ $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 }} +

+ {{ . }} +

+ {{ end }} + + +
+ {{ if .Params.personal }} + {{ partial "social_links" .Site.Author }} + {{ else }} + {{ partial "social_links" .Site.Params }} + {{ end }}
diff --git a/layouts/partials/social_links.html b/layouts/partials/social_links.html index e06fade..ea6ee85 100644 --- a/layouts/partials/social_links.html +++ b/layouts/partials/social_links.html @@ -1,4 +1,4 @@ -{{ range .Params.social }} +{{ range .social }} {{ $pack := or .icon_pack "fas" }} {{ $pack_prefix := $pack }} {{ if in (slice "fab" "fas" "far" "fal") $pack }} @@ -15,7 +15,7 @@ -- cgit v1.2.3