mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-13 01:02:10 +00:00
Exclude dark image variants from print media
Save some ink, yo
This commit is contained in:
parent
208b0fe43e
commit
35b6c2eeae
1 changed files with 5 additions and 5 deletions
|
@ -14,35 +14,35 @@
|
||||||
<source
|
<source
|
||||||
srcset="{{ $dark_svg_src.RelPermalink }}"
|
srcset="{{ $dark_svg_src.RelPermalink }}"
|
||||||
type="image/svg+xml"
|
type="image/svg+xml"
|
||||||
media="(prefers-color-scheme: dark)">
|
media="screen and (prefers-color-scheme: dark)">
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ with $dark_jxl -}}
|
{{ with $dark_jxl -}}
|
||||||
{{ $dark_jxl_src := . | resources.Fingerprint "md5" -}}
|
{{ $dark_jxl_src := . | resources.Fingerprint "md5" -}}
|
||||||
<source
|
<source
|
||||||
srcset="{{ $dark_jxl_src.RelPermalink }}"
|
srcset="{{ $dark_jxl_src.RelPermalink }}"
|
||||||
type="image/jxl"
|
type="image/jxl"
|
||||||
media="(prefers-color-scheme: dark)">
|
media="screen and (prefers-color-scheme: dark)">
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ with $dark_avif -}}
|
{{ with $dark_avif -}}
|
||||||
{{ $dark_avif_src := . | resources.Fingerprint "md5" -}}
|
{{ $dark_avif_src := . | resources.Fingerprint "md5" -}}
|
||||||
<source
|
<source
|
||||||
srcset="{{ $dark_avif_src.RelPermalink }}"
|
srcset="{{ $dark_avif_src.RelPermalink }}"
|
||||||
type="image/avif"
|
type="image/avif"
|
||||||
media="(prefers-color-scheme: dark)">
|
media="screen and (prefers-color-scheme: dark)">
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ with $dark_webp -}}
|
{{ with $dark_webp -}}
|
||||||
{{ $dark_webp_src := . | resources.Fingerprint "md5" -}}
|
{{ $dark_webp_src := . | resources.Fingerprint "md5" -}}
|
||||||
<source
|
<source
|
||||||
srcset="{{ $dark_webp_src.RelPermalink }}"
|
srcset="{{ $dark_webp_src.RelPermalink }}"
|
||||||
type="image/webp"
|
type="image/webp"
|
||||||
media="(prefers-color-scheme: dark)">
|
media="screen and (prefers-color-scheme: dark)">
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ with $dark_png -}}
|
{{ with $dark_png -}}
|
||||||
{{ $dark_png_src := . | resources.Fingerprint "md5" -}}
|
{{ $dark_png_src := . | resources.Fingerprint "md5" -}}
|
||||||
<source
|
<source
|
||||||
srcset="{{ $dark_png_src.RelPermalink }}"
|
srcset="{{ $dark_png_src.RelPermalink }}"
|
||||||
type="image/png"
|
type="image/png"
|
||||||
media="(prefers-color-scheme: dark)">
|
media="screen and (prefers-color-scheme: dark)">
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ with $light_svg -}}
|
{{ with $light_svg -}}
|
||||||
{{ $light_svg_src := . | resources.Fingerprint "md5" -}}
|
{{ $light_svg_src := . | resources.Fingerprint "md5" -}}
|
||||||
|
|
Loading…
Reference in a new issue