bits 0x45 - Calender Week 11, 2024
Default to light mode
I do my best to make my site as “flat” as possible so that any client-side modification could opt-in without any issue. There are people who can’t read white on black as well as those who can’t read white on black. Some people need extra big fonts and some people need screen reader. Anyways the “hacker aesthetics” should not get in the way.
I used a dark theme as default because it reads better for my eyes. I never bothered to try to invert the theme to the light mode because I thought it would be trivial given how “plaintext” my site is. However I just learned that (e.g. with the plugin “dark reader”) making a dark site light is not as easy as making a light site dark.
I wanted to have a “switch theme” button but it would break my promise of not
using javascript. And even if I used javascript, it still requires a overhaul of
the stylesheet, e.g. making every color a “variable”. There was an alternative:
I prepare two stylesheets, one for light mode and one for dark mode. The
javascript button simply switches between the two stylesheets. However when you
replace the href
field of the stylesheet link to another theme, the browser is
too lazy to re-render the page to reflect the changes and I still haven’t
succeeded with this approach.
So, fuck it, I’ll just default to the light theme, the stylesheet should define no more color than necessary1. I’d like to repeat (perhaps too radical) the WebUI sanity guideline:
“looks good/cool/easy to read” is subjective. Ship no more than the content. Let the readers decide how they want to read it.
Moving to aerc, maybe?
It took me a while to get adapted to neomutt, and it has been great. But still it’s a pain to configure it…. aerc is an promising alternative that has vim-binding builtin and the configuration is straight-forward.
There is one bump though… Let’s see how it goes..
UPDATE: I fixed it in the ugly way…. Or should I say, gnupg did it the ugly way? Ugly problems demand ugly solutions!
(or perhaps I can learn Go and fix it myself?)
Good Reads
Fun with Timers and cpuid by Jim Cownie https://cpufun.substack.com/p/fun-with-timers-and-cpuid
-
a background color (because still want something softer than plain
#ffffff
), an alt background color for block quotes, and one or two accent colors for e.g. the menu. Other colors, such as text and links, are all html-default. ↩︎
[+] click to leave a comment [+]
>> SEND COMMENT <<