Nachtzuster / BirdNET-Pi

A realtime acoustic bird classification system for the Raspberry Pi 5, 4B 3B+ 0W2 and more. Built on the TFLite version of BirdNET.
https://birdnetpi.com
Other
89 stars 18 forks source link

Feature proposal : darkmode #85

Closed alexbelgium closed 3 weeks ago

alexbelgium commented 1 month ago

Proposed style :

alexbelgium commented 1 month ago

Hi, still in draft but what do you think would you be interested?

it would be super simple : have a dark-style.css, a variable in birdnet.conf that says if light (default) or dark, and an icon to switch between both

alexbelgium commented 1 month ago

css should be OK as long as people like the colors :-) of course we can adapt easily ; for example if people prefer a greener gray

alexbelgium commented 1 month ago

Ok, all should be good now. In the way the code is set, we could even create additional color schemes and allow users to change colors beyong light/dark. There is no automatic switch as it might be quite complex to implement.

Nachtzuster commented 1 month ago

Hi, still in draft but what do you think would you be interested?

I don't care much about dark themes personally, but I guess BirdNET-Pi users might :-)

I'll look into this later this week

alexbelgium commented 1 month ago

Thanks!

Optimisation of css remaining :

Nachtzuster commented 4 weeks ago

Code-wise this looks fine. I'm guessing you're still finetuning for now, so let me know when you're done

alexbelgium commented 4 weeks ago

Thanks! I have solved the issues that I was raising above and will just have last look end of the week to be sure all is fine

alexbelgium commented 4 weeks ago

I guess it's good enough to merge. I don't see anything standing out and I've added an auto reload (same as for site name change) so that users directly see the impact of changing the color scheme

Nachtzuster commented 4 weeks ago

... so I went to the dark side: a couple things are still 'light themed' tools->System Info, tools->File Manager and tools->Database Maintenance

These are kinda expected, these are not trivial to convert, I guess. The plan is to keep these as-is for now?

alexbelgium commented 3 weeks ago

Well I had a look but it would probably require changing the logic of how to pages (filebrowser and systeminfo) are called. Currently it seem a light theme is hard coded, so we might have to call them those with a specific argument from which they derive their color scheme. I can do that but it would a bit complexify the system

Aixsponsa commented 3 weeks ago

I was working on a better theme with dark mode support awhile ago but scrapped it. I'm not the best with Git but I would imagine it's somewhere in my long list of commits (I was doing a lot of testing at the time). It worked really well if I remember correctly. I just had to do a lot of changes to make everything look polished, which is when I stopped.

alexbelgium commented 3 weeks ago

Thanks ! I'll have a look. I didn't really want to recreate everything, just change the main css in a quick manner ;) I don't have that much time either to really develop a whole new theme... But we can start like that and move on to something more complex later !

Nachtzuster commented 3 weeks ago

Well I had a look but it would probably require changing the logic of how to pages (filebrowser and systeminfo) are called. Currently it seem a light theme is hard coded, so we might have to call them those with a specific argument from which they derive their color scheme. I can do that but it would a bit complexify the system

I'm fine with merging your work as-is, just say the word

alexbelgium commented 3 weeks ago

Then let's go! And if I find a fast & easy solution for the third party tools (filebrowser and phpsysinfo) i'll make another pr - anyway it is not a core functionality

Thanks!

bdeschut commented 2 weeks ago

@alexbelgium It's silly, but wanted to let you know anyway. When using dark mode, the "X" to close the little detections over 30d graph is almost invisible:

image
bdeschut commented 2 weeks ago

@alexbelgium Same for the drop down menu's in tools > settings: image

alexbelgium commented 2 weeks ago

Thanks, I'll start a pull request to improve