1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
{{- /*
Bio card for the homepage. Ported from fzakaria.com's _includes/colophon.html.
Reads entirely from site.Params.profile, so it renders nothing until that's
configured in hugo.toml, and the avatar itself no-ops if the file is missing.
*/ -}}
{{- with site.Params.profile -}}
{{- $profile := . -}}
<aside class="colophon" id="about">
{{- with .avatar }}
{{- with resources.Get . }}
<img
class="colophon__avatar"
src="{{ .RelPermalink }}"
width="{{ .Width }}"
height="{{ .Height }}"
alt="{{ $profile.avatarAlt | default site.Title }}"
>
{{- end }}
{{- end }}
<div>
{{- if or .firstName .lastName }}
<p class="colophon__name">{{ with .firstName }}{{ . }} {{ end }}<span class="colophon__name-last">{{ .lastName }}</span></p>
{{- end }}
{{- with .bio | default site.Params.description }}
<div class="colophon__bio">{{ . | markdownify }}</div>
{{- end }}
{{- with .links }}
<ul class="colophon__links">
{{- range . }}
<li>
<span class="key">{{ .key }}</span>
<span class="val"><a href="{{ .url }}">{{ .value }}</a></span>
</li>
{{- end }}
</ul>
{{- end }}
</div>
</aside>
{{- end -}}
|