mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-12-17 22:32:10 +00:00
Fix: visible dark webring icon in Webkit
Dark mode now switches to a different icon instead of inverting it. There's probably a better way but I'll figure that out later.
This commit is contained in:
parent
4e7a0c8bde
commit
bc667feec6
6 changed files with 17 additions and 4 deletions
|
@ -5,7 +5,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* IndieWeb u-photo should be distinct from the background */
|
/* IndieWeb u-photo should be distinct from the background */
|
||||||
.dark-invert {
|
.u-photo {
|
||||||
-webkit-filter: invert(100%);
|
-webkit-filter: invert(100%);
|
||||||
filter: invert(100%);
|
filter: invert(100%);
|
||||||
}
|
}
|
||||||
|
|
BIN
assets/p/merveilles_ring_dark.png
Normal file
BIN
assets/p/merveilles_ring_dark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 307 B |
1
assets/p/merveilles_ring_dark.svg
Normal file
1
assets/p/merveilles_ring_dark.svg
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<svg fill="none" height="300" stroke="#fff" stroke-linecap="square" stroke-width="28" width="300" xmlns="http://www.w3.org/2000/svg"><path d="M201.962 210a60 60 0 10-103.924-60l-50 86.603"/><path d="M98.038 210a60 60 0 10103.924-60l-50-86.603"/><path d="M150 120a60 60 0 100 120h100"/></svg>
|
After Width: | Height: | Size: 292 B |
|
@ -4,7 +4,19 @@
|
||||||
<!--svg image with a fallback to a PNG when SVG is unsupported-->
|
<!--svg image with a fallback to a PNG when SVG is unsupported-->
|
||||||
{{- $merveilles_svg := resources.GetMatch (printf "/p/merveilles_ring.svg") -}}
|
{{- $merveilles_svg := resources.GetMatch (printf "/p/merveilles_ring.svg") -}}
|
||||||
{{ $merveilles_png := resources.GetMatch (printf "/p/merveilles_ring.png") -}}
|
{{ $merveilles_png := resources.GetMatch (printf "/p/merveilles_ring.png") -}}
|
||||||
<a href="https://webring.xxiivv.com/#random" target="_blank" rel="noopener"><picture class="dark-invert">
|
{{- $merveilles_svg_dark := resources.GetMatch (printf "/p/merveilles_ring_dark.svg") -}}
|
||||||
|
{{ $merveilles_png_dark := resources.GetMatch (printf "/p/merveilles_ring_dark.png") -}}
|
||||||
|
<a href="https://webring.xxiivv.com/#random" target="_blank" rel="noopener"><picture>
|
||||||
|
{{ $merveilles_svg_src := $merveilles_svg_dark | resources.Fingerprint "md5" -}}
|
||||||
|
<source
|
||||||
|
srcset="{{ $merveilles_svg_src.RelPermalink }}"
|
||||||
|
type="image/svg+xml"
|
||||||
|
media="(prefers-color-scheme: dark)">
|
||||||
|
{{ $merveilles_png_src := $merveilles_png_dark | resources.Fingerprint "md5" -}}
|
||||||
|
<source
|
||||||
|
srcset="{{ $merveilles_png_src.RelPermalink }}"
|
||||||
|
type="image/png"
|
||||||
|
media="(prefers-color-scheme: dark)">
|
||||||
{{ $merveilles_svg_src := $merveilles_svg | resources.Fingerprint "md5" -}}
|
{{ $merveilles_svg_src := $merveilles_svg | resources.Fingerprint "md5" -}}
|
||||||
<source
|
<source
|
||||||
srcset="{{ $merveilles_svg_src.RelPermalink }}"
|
srcset="{{ $merveilles_svg_src.RelPermalink }}"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<!-- re-using the indefinetly-cached favicon to avoid bloating page size -->
|
<!-- re-using the indefinetly-cached favicon to avoid bloating page size -->
|
||||||
{{ $favicon := resources.Get "/favicon.png" | resources.Fingerprint "md5" -}}
|
{{ $favicon := resources.Get "/favicon.png" | resources.Fingerprint "md5" -}}
|
||||||
<span itemprop="author" class="h-card p-author"><a href="https://seirdy.one" rel="author home" class="u-url url"><img class="u-photo dark-invert" src="{{ $favicon.RelPermalink }}" width="16" height="16" alt="Rohan Kumar" > <span class="p-name"><span class="p-given-name">Rohan</span> <span class="p-family-name">Kumar</span></span></a></span>
|
<span itemprop="author" class="h-card p-author"><a href="https://seirdy.one" rel="author home" class="u-url url"><img class="u-photo" src="{{ $favicon.RelPermalink }}" width="16" height="16" alt="Rohan Kumar" > <span class="p-name"><span class="p-given-name">Rohan</span> <span class="p-family-name">Kumar</span></span></a></span>
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<!-- re-using the indefinetly-cached favicon to avoid bloating page size -->
|
<!-- re-using the indefinetly-cached favicon to avoid bloating page size -->
|
||||||
{{ $favicon := resources.Get "/favicon.png" | resources.Fingerprint "md5" -}}
|
{{ $favicon := resources.Get "/favicon.png" | resources.Fingerprint "md5" -}}
|
||||||
<img class="u-photo dark-invert" src="{{ $favicon.RelPermalink }}" width="16" height="16" alt="Rohan Kumar">
|
<img class="u-photo" src="{{ $favicon.RelPermalink }}" width="16" height="16" alt="Rohan Kumar">
|
||||||
|
|
Loading…
Reference in a new issue