Taggat r4s på Rasmus.krats.sehttps://rasmus.krats.se/tag/r4s.sv2022-05-16T22:11:00+00:00Skriverier då och då, på webben sedan 1994.Light or dark?https://rasmus.krats.se/2022/theme.en2022-05-16T22:11:00+00:00Rasmus Kajhttps://rasmus.krats.se/rkaj2022-05-16T22:11:00+00:00<p>I’ve had a light and a dark theme on this site since <a href="/2022/r4s.en" data-type='Inline'>I switch from python
to rust</a>.
But until now I have only used css <code>@media</code> selection to enable the
dark theme, so it hasn’t been very discoverable.
If you have a browser that supports the <code>prefers-color-scheme</code> query <em>and</em>
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).</p>
<p class='readmore'><a href='https://rasmus.krats.se/2022/theme.en'>Read whole <q>Light or dark?</q>.</a></p>Tracker-free youtube embeddinghttps://rasmus.krats.se/2022/youtube.en2022-04-03T18:04:25+00:00Rasmus Kajhttps://rasmus.krats.se/rkaj2022-04-03T18:04:25+00:00<p>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:</p>
<pre data-lang="html"><span class="syhtext syhhtml syhbasic"><span class="syhmeta syhtag syhblock syhany syhhtml"><span class="syhpunctuation syhdefinition syhtag syhbegin syhhtml"><</span><span class="syhentity syhname syhtag syhblock syhany syhhtml">iframe</span> <span class="syhmeta syhattribute-with-value syhhtml"><span class="syhentity syhother syhattribute-name syhhtml">width</span><span class="syhpunctuation syhseparator syhkey-value syhhtml">=</span></span><span class="syhmeta syhattribute-with-value syhhtml"><span class="syhstring syhquoted syhdouble syhhtml"><span class="syhpunctuation syhdefinition syhstring syhbegin syhhtml">"</span>560<span class="syhpunctuation syhdefinition syhstring syhend syhhtml">"</span></span></span> <span class="syhmeta syhattribute-with-value syhhtml"><span class="syhentity syhother syhattribute-name syhhtml">height</span><span class="syhpunctuation syhseparator syhkey-value syhhtml">=</span></span><span class="syhmeta syhattribute-with-value syhhtml"><span class="syhstring syhquoted syhdouble syhhtml"><span class="syhpunctuation syhdefinition syhstring syhbegin syhhtml">"</span>315<span class="syhpunctuation syhdefinition syhstring syhend syhhtml">"</span></span></span> <span class="syhmeta syhattribute-with-value syhhtml"><span class="syhentity syhother syhattribute-name syhhtml">src</span><span class="syhpunctuation syhseparator syhkey-value syhhtml">=</span></span><span class="syhmeta syhattribute-with-value syhhtml"><span class="syhstring syhquoted syhdouble syhhtml"><span class="syhpunctuation syhdefinition syhstring syhbegin syhhtml">"</span>https://www.youtube.com/embed/3St1CoH1rKU<span class="syhpunctuation syhdefinition syhstring syhend syhhtml">"</span></span></span>
<span class="syhmeta syhattribute-with-value syhhtml"><span class="syhentity syhother syhattribute-name syhhtml">title</span><span class="syhpunctuation syhseparator syhkey-value syhhtml">=</span></span><span class="syhmeta syhattribute-with-value syhhtml"><span class="syhstring syhquoted syhdouble syhhtml"><span class="syhpunctuation syhdefinition syhstring syhbegin syhhtml">"</span>YouTube video player<span class="syhpunctuation syhdefinition syhstring syhend syhhtml">"</span></span></span> <span class="syhmeta syhattribute-with-value syhhtml"><span class="syhentity syhother syhattribute-name syhhtml">frameborder</span><span class="syhpunctuation syhseparator syhkey-value syhhtml">=</span></span><span class="syhmeta syhattribute-with-value syhhtml"><span class="syhstring syhquoted syhdouble syhhtml"><span class="syhpunctuation syhdefinition syhstring syhbegin syhhtml">"</span>0<span class="syhpunctuation syhdefinition syhstring syhend syhhtml">"</span></span></span>
<span class="syhmeta syhattribute-with-value syhhtml"><span class="syhentity syhother syhattribute-name syhhtml">allow</span><span class="syhpunctuation syhseparator syhkey-value syhhtml">=</span></span><span class="syhmeta syhattribute-with-value syhhtml"><span class="syhstring syhquoted syhdouble syhhtml"><span class="syhpunctuation syhdefinition syhstring syhbegin syhhtml">"</span>accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture<span class="syhpunctuation syhdefinition syhstring syhend syhhtml">"</span></span></span>
<span class="syhentity syhother syhattribute-name syhhtml">allowfullscreen</span><span class="syhpunctuation syhdefinition syhtag syhend syhhtml">></span></span>
<span class="syhmeta syhtag syhblock syhany syhhtml"><span class="syhpunctuation syhdefinition syhtag syhbegin syhhtml"></</span><span class="syhentity syhname syhtag syhblock syhany syhhtml">iframe</span><span class="syhpunctuation syhdefinition syhtag syhend syhhtml">></span></span>
</span></pre>
<p class='readmore'><a href='https://rasmus.krats.se/2022/youtube.en'>Read whole <q>Tracker-free youtube embedding</q>.</a></p>Ny blogmjukvarahttps://rasmus.krats.se/2022/r4s.sv2022-01-16T22:07:00+00:00Rasmus Kajhttps://rasmus.krats.se/rkaj2022-01-16T22:07:00+00:00<figure class='sidebar front' data-type='ReferenceUnknown'><a href='https://img.krats.se/img/71847-m.jpg'><img src='https://img.krats.se/img/71847-s.jpg' alt='Fyrverkerier över tak' width='288' height='216'></a><figcaption>Nytt år, ny blogmotor </figcaption></figure>
<p>Jag har skrivit ny blogmjukvara igen!
Den förra hette <a href="https://github.com/kaj/r5" data-type='Inline'>r5</a>, som i Rasmus (utan 5
bokstäver). Den nya är skriven i Rust (källkodsfilerna heter <code>.rs</code>),
så det kändes naturligt att kalla den <a href="https://github.com/kaj/r4s" data-type='Inline'>r4s</a>,
också som i Rasmus (men utan 4 bokstäver 😎).</p>
<p>Nu får vi se om ett nytt kul blogprogram får mig att skriva fler blogposter.</p>
<p class='readmore'><a href='https://rasmus.krats.se/2022/r4s.sv'>Läs hela <q>Ny blogmjukvara</q> med 1 kommentarer.</a></p>