diff options
author | Oscar Najera <hi@oscarnajera.com> | 2023-10-17 03:42:49 +0200 |
---|---|---|
committer | Oscar Najera <hi@oscarnajera.com> | 2023-10-17 03:58:24 +0200 |
commit | c7cea43cc00ea4cdddfb09466eca268dc3b7a972 (patch) | |
tree | ba8900d583bc80c6f2d68d076c40b07bc5574b00 /layouts | |
parent | b90aa5cc74801c5b70f591b73b3de7ec4ad6362a (diff) | |
download | hugo-minimalist-theme-c7cea43cc00ea4cdddfb09466eca268dc3b7a972.tar.gz hugo-minimalist-theme-c7cea43cc00ea4cdddfb09466eca268dc3b7a972.tar.bz2 hugo-minimalist-theme-c7cea43cc00ea4cdddfb09466eca268dc3b7a972.zip |
About page compatible with personal and project
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/about.html | 31 | ||||
-rw-r--r-- | 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" > <div id="hero" class="mw7 center ph2 near-white lh-copy tc"> - <img src="{{ .Site.Author.avatar }}" class="br-100" /> - <h1 class="f1 mv1">{{ .Site.Author.name }}</h1> - <h2 class="f3 fw3 pa0 ma0">{{ .Site.Author.role }}</h2> - <div class="f2"> - {{ partial "social_links" . }} + {{ $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"> + {{ . }} + </h2> + {{ end }} + + + <div class="f2 mt3"> + {{ if .Params.personal }} + {{ partial "social_links" .Site.Author }} + {{ else }} + {{ partial "social_links" .Site.Params }} + {{ end }} </div> </div> </div> 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 @@ <a href="{{ $link | safeURL }}" {{ $target | safeHTMLAttr }} - class="link near-white" + class="link color-inherit" > <i class="{{ $pack }} {{ $pack_prefix }}-{{ .icon }} h2"></i> </a> |