Optimize rss-image
This commit is contained in:
parent
aad72ed12c
commit
ca389c0d8a
6 changed files with 9 additions and 4 deletions
BIN
assets/rss-image.avif
Normal file
BIN
assets/rss-image.avif
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
BIN
assets/rss-image.jpg
Normal file
BIN
assets/rss-image.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.1 KiB |
|
@ -29,9 +29,9 @@ params:
|
|||
isso_url: "comments.redstrate.com"
|
||||
geekring_site_id: 227
|
||||
gitlab_username: "redstrate"
|
||||
profile_picture: "/rss-image.png"
|
||||
profile_picture: "/rss-image.jpg"
|
||||
images:
|
||||
- rss-image.png
|
||||
- rss-image.jpg
|
||||
author: 'redstrate'
|
||||
fediverse_url: "@redstrate@mastodon.art"
|
||||
image_host: "https://images.redstrate.com"
|
||||
|
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
@ -2,7 +2,6 @@
|
|||
<html lang="{{ .Site.LanguageCode }}" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
|
||||
<head>
|
||||
{{- partial "head.html" . -}}
|
||||
|
||||
{{- block "head" . }}{{- end }}
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
{{ with resources.Get .Site.Params.profile_picture }}
|
||||
<img alt="Profile Picture" src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
|
||||
<picture>
|
||||
{{ $avif_path := replace . ".png" ".avif "}}
|
||||
{{ with resources.Get (strings.TrimSpace $avif_path) }}
|
||||
<source srcset="{{ .RelPermalink }}" type="image/avif">
|
||||
{{ end }}
|
||||
<img alt="Profile Picture" src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
|
||||
</picture>
|
||||
{{ end }}
|
||||
<h1>{{ .Site.Title }}</h1>
|
||||
|
|
Loading…
Add table
Reference in a new issue