mykiwi/mykiwi.blogpublic Fork 0
78c3f9f4ba3fbfbd1c82d539b9b15f093367c716
Commits
Clone
git clone https://git.rickub.com/mykiwi/mykiwi.blog.git
git clone ssh://git@rickub.com/mykiwi/mykiwi.blog.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

colophon.html · 49 lines · 1.7 KBHTML Blame HistoryRaw
Port fzakaria.com design to Hugo and add a homepage profile 1bdbd06 Romain Gautier 21h ago1{{- /*
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 ago11 {{- /*
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 ago18 <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 ago24 {{- 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 ago27 >
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 -}}