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