Daily Shaarli
September 28, 2022
Great tips indeed
Dark patterns 🍿
Code itself won't tell you about the decisions and rationale behind it, nor about about higher-level structures and abstractions. All this needs elaboration in documentation.
Use: <video autoplay loop muted playsinline src="cats.mp4"></video>
as Twitter does
About #mp4, #webm, #x264, #x265, #VP9, #VP8, #AV1 containers and codecs
Evilmartian uses the new codec and here is the comparison: "In AV1 it is just 68 KB, similar to the image file. HEVC is 195 KB, and H264 is 512 КB."
Use an image for dark mode only 😯
<picture>
<source srcset="dark-animation.avifs" media="(prefers-color-scheme: dark)">
<img src="light-animation.avif" alt="">
</picture>
Stats are there for the year 2022, and updated yearly. A mine of resources.
And I am migrating from Pelican to Astro x)
Nano ID is nano-sized unique string ID generator for JavaScript. It’s truly small (130 bytes minified), URL-friendly, and it has no dependencies. Plus, it’s safe, secure, and fast.
Project link: https://github.com/ai/nanoid
A small library to generate unique ids. It is implemented in a lot of other languages too.