Skriverier då och då, på webben sedan 1994.
Posted 2022-05-16 22:11. Tagged web, meta, javascript, css, r4s.
I’ve had a light and a dark theme on this site since I switch from python
to rust.
But until now I have only used css @media selection to enable the
dark theme, so it hasn’t been very discoverable.
If you have a browser that supports the prefers-color-scheme query and
you have found that setting and enabled dark mode, you have seen this site
in the dark theme (and may not know that it had a light theme), otherwise you have
seen the site in the light theme (and not known about the dark).
So now this site have a theme
button in the header.
By clicking it you toggle between the device default
, dark
and light
theme.
The default is the device default
, which is the same as before I
introduced the button, either dark or light based on browser preference.
So people who have made an active choise in their browser get that choise on
this site automatically.
Read whole Light or dark?
.
Posted 2022-04-03 18:04. Tagged web, kakor, meta, rust, gdpr, r4s.
Sometimes I want to embed a video on my site.
Most of the videos I want to embed are on youtube.
Klicking share
on a video and choosing embed, I get a bunch of html
code I can copy into a post.
Something like this, for example:
<iframe width="560" height="315" src="https://www.youtube.com/embed/3St1CoH1rKU"
title="YouTube video player" frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
</iframe>
That’s very easy.
The downside is that youtube gets a request for the iframe (and a
bunch of stuff it loads from there) every time someone looks at my
page, which makes it possible for them to track you, my reader, across
my site and other sites that includes videos.
Read whole Tracker-free youtube embedding
.
Publicerad 2022-01-16 22:07. Taggat web, meta, rust, css, r4s.
Jag har skrivit ny blogmjukvara igen!
Den förra hette r5, som i Rasmus (utan 5
bokstäver). Den nya är skriven i Rust (källkodsfilerna heter .rs),
så det kändes naturligt att kalla den r4s,
också som i Rasmus (men utan 4 bokstäver 😎).
Nu får vi se om ett nytt kul blogprogram får mig att skriva fler blogposter.
Utseendet är inspirerat av Eric
Meyers Hamonshu och
hans teknik Pseudo-Randomly Adding Illustrations with
CSS
,
men med bilder och typografi som känns mer jag
.
Läs hela Ny blogmjukvara
med 1 kommentarer.