modified blog/assets/css/style.scss +2 -0
| @@ -1040,6 +1040,8 @@ blockquote.alert { |
| 1040 | 1040 | margin-bottom: 0.85rem; |
| 1041 | 1041 | filter: grayscale(0.35); |
| 1042 | 1042 | transition: filter 0.3s ease; |
| 1043 | + background-size: cover; |
| 1044 | + background-position: center; |
| 1043 | 1045 | |
| 1044 | 1046 | &:hover { |
| 1045 | 1047 | filter: grayscale(0); |
| @@ -1040,6 +1040,8 @@ blockquote.alert { |
| 1040 | margin-bottom: 0.85rem; | 1040 | margin-bottom: 0.85rem; |
| 1041 | filter: grayscale(0.35); | 1041 | filter: grayscale(0.35); |
| 1042 | transition: filter 0.3s ease; | 1042 | transition: filter 0.3s ease; |
| | 1043 | + background-size: cover; |
| | 1044 | + background-position: center; |
| 1043 | | 1045 | |
| 1044 | &:hover { | 1046 | &:hover { |
| 1045 | filter: grayscale(0); | 1047 | filter: grayscale(0); |
added blog/assets/images/avatar-blurhash.png +0 -0
| new file mode 100644 |
| | Binary files /dev/null and b/blog/assets/images/avatar-blurhash.png differ |
| new file mode 100644 |
| Binary files /dev/null and b/blog/assets/images/avatar-blurhash.png differ | | Binary files /dev/null and b/blog/assets/images/avatar-blurhash.png differ |
modified blog/layouts/partials/colophon.html +10 -0
| @@ -8,12 +8,22 @@ |
| 8 | 8 | <aside class="colophon" id="about"> |
| 9 | 9 | {{- with .avatar }} |
| 10 | 10 | {{- with resources.Get . }} |
| 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 | + */}} |
| 11 | 18 | <img |
| 12 | 19 | class="colophon__avatar" |
| 13 | 20 | src="{{ .RelPermalink }}" |
| 14 | 21 | width="{{ .Width }}" |
| 15 | 22 | height="{{ .Height }}" |
| 16 | 23 | alt="{{ $profile.avatarAlt | default site.Title }}" |
| 24 | + {{- with resources.Get "images/avatar-blurhash.png" }} |
| 25 | + style="background-image:url('{{ .RelPermalink }}')" |
| 26 | + {{- end }} |
| 17 | 27 | > |
| 18 | 28 | {{- end }} |
| 19 | 29 | {{- end }} |
| @@ -8,12 +8,22 @@ |
| 8 | <aside class="colophon" id="about"> | 8 | <aside class="colophon" id="about"> |
| 9 | {{- with .avatar }} | 9 | {{- with .avatar }} |
| 10 | {{- with resources.Get . }} | 10 | {{- with resources.Get . }} |
| | 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 | + */}} |
| 11 | <img | 18 | <img |
| 12 | class="colophon__avatar" | 19 | class="colophon__avatar" |
| 13 | src="{{ .RelPermalink }}" | 20 | src="{{ .RelPermalink }}" |
| 14 | width="{{ .Width }}" | 21 | width="{{ .Width }}" |
| 15 | height="{{ .Height }}" | 22 | height="{{ .Height }}" |
| 16 | alt="{{ $profile.avatarAlt | default site.Title }}" | 23 | alt="{{ $profile.avatarAlt | default site.Title }}" |
| | 24 | + {{- with resources.Get "images/avatar-blurhash.png" }} |
| | 25 | + style="background-image:url('{{ .RelPermalink }}')" |
| | 26 | + {{- end }} |
| 17 | > | 27 | > |
| 18 | {{- end }} | 28 | {{- end }} |
| 19 | {{- end }} | 29 | {{- end }} |