| Port fzakaria.com design to Hugo and add a homepage profile 1bdbd06 Romain Gautier 21h ago | 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 . }} |
| Add blurhash placeholder for the colophon avatar 78c3f9f Romain Gautier 13h ago | 11 | {{- /* |
| 12 | avatar-blurhash.png is a 16x16 decode of the avatar's blurhash |
| 13 | (oZL;Z^4m?wng-PoL~XNbOsShRjNGXTxt={xtM{xZo$t8%1a$IVRk%Nxut6W;IoWBj]V[V@RjR+s.), |
| 14 | shown via CSS while the real photo loads - |
| 15 | regenerate it from a new avatar with a blurhash encoder/decoder if |
| 16 | the avatar ever changes. |
| 17 | */}} |
| Port fzakaria.com design to Hugo and add a homepage profile 1bdbd06 Romain Gautier 21h ago | 18 | <img |
| 19 | class="colophon__avatar" |
| 20 | src="{{ .RelPermalink }}" |
| 21 | width="{{ .Width }}" |
| 22 | height="{{ .Height }}" |
| 23 | alt="{{ $profile.avatarAlt | default site.Title }}" |
| Add blurhash placeholder for the colophon avatar 78c3f9f Romain Gautier 13h ago | 24 | {{- with resources.Get "images/avatar-blurhash.png" }} |
| 25 | style="background-image:url('{{ .RelPermalink }}')" |
| 26 | {{- end }} |
| Port fzakaria.com design to Hugo and add a homepage profile 1bdbd06 Romain Gautier 21h ago | 27 | > |
| 28 | {{- end }} |
| 29 | {{- end }} |
| 30 | <div> |
| 31 | {{- if or .firstName .lastName }} |
| 32 | <p class="colophon__name">{{ with .firstName }}{{ . }} {{ end }}<span class="colophon__name-last">{{ .lastName }}</span></p> |
| 33 | {{- end }} |
| 34 | {{- with .bio | default site.Params.description }} |
| 35 | <div class="colophon__bio">{{ . | markdownify }}</div> |
| 36 | {{- end }} |
| 37 | {{- with .links }} |
| 38 | <ul class="colophon__links"> |
| 39 | {{- range . }} |
| 40 | <li> |
| 41 | <span class="key">{{ .key }}</span> |
| 42 | <span class="val"><a href="{{ .url }}">{{ .value }}</a></span> |
| 43 | </li> |
| 44 | {{- end }} |
| 45 | </ul> |
| 46 | {{- end }} |
| 47 | </div> |
| 48 | </aside> |
| 49 | {{- end -}} |