mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
Include SVG version of u-photo on homepage
Useful for other IndieWeb software that parses homepages and renders avatars.
This commit is contained in:
parent
f589e3f306
commit
5d685d2ce6
2 changed files with 8 additions and 2 deletions
|
@ -106,7 +106,7 @@ pre,
|
|||
}
|
||||
|
||||
/* center images that aren't my indieweb icon */
|
||||
img:not(.u-photo) {
|
||||
picture:not(.u-photo) img {
|
||||
display: block;
|
||||
height: auto;
|
||||
margin: auto;
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
{{ $favicon := resources.Get "/favicon.png" -}}
|
||||
{{- $favicon_base64 := $favicon.Content | base64Encode -}}
|
||||
<img itemprop="image" class="u-photo photo" src="data:image/png;base64,{{ $favicon_base64 }}" width="16" height="16" alt="">
|
||||
{{- $favicon_svg := resources.Get "/favicon.svg" | resources.Fingerprint "md5" -}}
|
||||
{{- $favicon_bigpng := resources.Get "/apple-touch-icon.png" | resources.Fingerprint "md5" -}}
|
||||
<picture itemprop="image" class="u-photo photo">
|
||||
<source srcset="{{ $favicon_svg.RelPermalink }}" type="image/svg+xml">
|
||||
<img src="data:image/png;base64,{{ $favicon_base64 }}" width="16" height="16" alt=""
|
||||
srcset="{{ $favicon_bigpng.RelPermalink }} 2x">
|
||||
</picture>
|
||||
|
|
Loading…
Reference in a new issue