aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/_default
diff options
context:
space:
mode:
authorOscar Najera <hi@oscarnajera.com>2023-10-17 03:42:49 +0200
committerOscar Najera <hi@oscarnajera.com>2023-10-17 03:58:24 +0200
commitc7cea43cc00ea4cdddfb09466eca268dc3b7a972 (patch)
treeba8900d583bc80c6f2d68d076c40b07bc5574b00 /layouts/_default
parentb90aa5cc74801c5b70f591b73b3de7ec4ad6362a (diff)
downloadhugo-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/_default')
-rw-r--r--layouts/_default/about.html31
1 files changed, 26 insertions, 5 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>