cblgh/lieu

Light theme wanted

bouncepaw opened this issue · 3 comments

Hello, light theme is needed. I tried to fork and modify the project but had some problems (on my side, probably) related to sqlite. I don't want to deal with them currently, so I'm leaving the the task to you :-)

You probably need to add this to base.css:

@media screen and (prefers-color-scheme: light) {
    :root {
        --primary: #000;
        --secondary: #fefefe;
    }
}

It will basically swap colors everywhere, except for the search button. You have hard-coded colors in the logo.svg, there are two ways to swap the colors:

  1. Provide two versions of the file and serve them depending on current theme.
  2. Change svg color with svg. Look here or somewhere else maybe.

Thanks

cblgh commented

Hi, thanks for your issue :)

Yes, I explored the option. The biggest reason it isn't implemented is that, by default, unconfigured browsers & operating systems will assume prefers-color-scheme: light. This was problematic as I want the default for uncofigured browsers to be the current scheme (light colours on dark backgrounds). I'll look into it again, as there's now someone that actually wants it :)

Thanks for the notice about the svg; I'll rectify that :)

As a sidenote, would you mind sharing the sqlite error you ran into? It would be interesting to know as I've yet to deploy to other machines, and ideally building from source or using the binaries should just work.

Thanks again!

The biggest reason it isn't implemented is that, by default, unconfigured browsers & operating systems will assume prefers-color-scheme: light.

Well, it isn't much of a problem nowadays, I think, but I still understand your hesitation. The most universal approach would be an explicit theme toggle, but that's not elegant at all!


As a sidenote, would you mind sharing the sqlite error you ran into?

The problem is I haven't got any sqlite errors! I fiddled around trying to find the source of the supposed error, I think it's around lieu ingest stage, because db tables are empty when inspected. I also I think I've done crawling correctly but I can't be sure. I'll probably return to that later (when light theme is done) on a different machine though; I'll open an issue if there are any problems.

cblgh commented

@bouncepaw with the new theming support, you can create a light theme for yr own instance :) i reckon that's close enough that this issue can be closed!