mykiwi/mykiwi.blogpublic Fork 0
39fe40279632e704958296750478c111197ece04
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 · 48 lines · 1.9 KBHTML Blame HistoryRaw
Port fzakaria.com design to Hugo and add a homepage profile 1bdbd06 Romain Gautier yesterday1{{- /*
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 16h ago11 {{- /*
Add SRI fingerprinting, inline avatar blurhash, and a language switcher icon 51380a7 Romain Gautier 15h ago12 Inlined (not a separate resources.Get file) so it paints with the
13 first HTML response instead of racing the real photo over the
14 network. 4x4 decode of the avatar's blurhash
15 (oZL;Z^4m?wng-PoL~XNbOsShRjNGXTxt={xtM{xZo$t8%1a$IVRk%Nxut6W;IoWBj]V[V@RjR+s.) -
Add blurhash placeholder for the colophon avatar 78c3f9f Romain Gautier 16h ago16 regenerate it from a new avatar with a blurhash encoder/decoder if
17 the avatar ever changes.
18 */}}
Port fzakaria.com design to Hugo and add a homepage profile 1bdbd06 Romain Gautier yesterday19 <img
Add SRI fingerprinting, inline avatar blurhash, and a language switcher icon 51380a7 Romain Gautier 15h ago20 alt="{{ $profile.avatarAlt | default site.Title }}"
21 style="background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAP0lEQVR42gE0AMv/AO3r6u7v+6Sco//9/wDLyqd5hnfju4PHx8QAsLOita+p0bOOycTFALuTaCBoRoeDRaKsnq0HINP5xdMWAAAAAElFTkSuQmCC')"
Port fzakaria.com design to Hugo and add a homepage profile 1bdbd06 Romain Gautier yesterday22 width="{{ .Width }}"
23 height="{{ .Height }}"
Add SRI fingerprinting, inline avatar blurhash, and a language switcher icon 51380a7 Romain Gautier 15h ago24 class="colophon__avatar"
25 src="{{ .RelPermalink }}"
Port fzakaria.com design to Hugo and add a homepage profile 1bdbd06 Romain Gautier yesterday26 >
27 {{- end }}
28 {{- end }}
29 <div>
30 {{- if or .firstName .lastName }}
31 <p class="colophon__name">{{ with .firstName }}{{ . }} {{ end }}<span class="colophon__name-last">{{ .lastName }}</span></p>
32 {{- end }}
33 {{- with .bio | default site.Params.description }}
34 <div class="colophon__bio">{{ . | markdownify }}</div>
35 {{- end }}
36 {{- with .links }}
37 <ul class="colophon__links">
38 {{- range . }}
39 <li>
40 <span class="key">{{ .key }}</span>
41 <span class="val"><a href="{{ .url }}">{{ .value }}</a></span>
42 </li>
43 {{- end }}
44 </ul>
45 {{- end }}
46 </div>
47</aside>
48{{- end -}}