uep
March 6, 2024, 10:08am
1
I loaded search.nixos.org today, and wasn’t blinded by the glare! Thankyou so much @zebreus
NixOS:main
← zebreus:darkmode
opened 03:53PM - 04 Mar 24 UTC
This PR adds a dark theme that is activated if the user has [`prefers-color-sche… me`](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) set to dark. The light theme is unchanged, the dark theme has some minor UI tweaks, to make it look better with a darker color scheme. The dark theme also does not have color gradients on some buttons, because I do not like them.
You can try nixos-search with darkmode at [search.wirs.ing](https://search.wirs.ing/).
## Screenshots
Some comparison screenshots between dark and light mode
### Package search
![darkmode package search](https://github.com/NixOS/nixos-search/assets/1557253/3db7541a-6661-4d9a-a6ad-921f09a4ea54)
![lightmode package search](https://github.com/NixOS/nixos-search/assets/1557253/bdae5361-87ff-4cf5-893f-b87cabba162d)
### Option search
![darkmode option search](https://github.com/NixOS/nixos-search/assets/1557253/df4ce33c-b303-4004-9f8e-d3fe6d1050a2)
![lightmode option search](https://github.com/NixOS/nixos-search/assets/1557253/999d8911-cbd7-4d7f-8756-fd032984e859)
### Flakes search
![darkmode flakes search](https://github.com/NixOS/nixos-search/assets/1557253/d0d5b06d-b670-4e57-b56e-eace5330c3c0)
![lightmode flakes search](https://github.com/NixOS/nixos-search/assets/1557253/55e4e388-2a82-4c1b-a6ee-4b2284e88749)
## Remarks
I had to actively fight the ancient bootstrap stylesheet we are using for styling some things. The bootstrap stylesheet is imported from nixos.org but I am pretty sure that it has not been used there for multiple years. As a consequence the CSS here is quite hacky, but we should probably rework the entire design anyways at some point in the future (related issue #286). For now this should be fine.
This PR will resolve #554
27 Likes
I also used search.nixos.org today, and felt that something was different even though I couldn’t place what it was. Now I know! Thanks for this welcome change