📓 use picture element to detect dark-mode in readme

This commit is contained in:
platane
2023-02-26 10:15:17 +01:00
parent 8ca289e908
commit 3803e1ccfa

View File

@@ -8,7 +8,24 @@
Generates a snake game from a github user contributions graph Generates a snake game from a github user contributions graph
![](https://github.com/Platane/snk/raw/output/github-contribution-grid-snake.svg) <picture>
<source
media="(prefers-color-scheme: dark)"
srcset="
https://raw.githubusercontent.com/platane/snk/output/github-contribution-grid-snake-dark.svg
"
/>
<source
media="(prefers-color-scheme: light)"
srcset="
https://raw.githubusercontent.com/platane/snk/output/github-contribution-grid-snake.svg
"
/>
<img
alt="github contribution grid snake animation"
src="https://raw.githubusercontent.com/platane/snk/output/github-contribution-grid-snake.svg"
/>
</picture>
Pull a github user's contribution graph. Pull a github user's contribution graph.
Make it a snake Game, generate a snake path where the cells get eaten in an orderly fashion. Make it a snake Game, generate a snake path where the cells get eaten in an orderly fashion.