Styles as Themes replacement #3759
GenericMale
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've been browsing through issues and open pull requests, and it seems like themes don't really have a future because they are really hard to maintain. Additionally, I haven't seen many instances adding entirely new themes (some add the old Oscar theme).
On the other hand, several instances customize and extend styles, along with logos, favicons, etc. Styles are significantly easier to maintain and don't require in-depth searxng knowledge. There are also open issues requesting some form of basic UI customization.
Proposal: Externalize Styles
I propose externalizing styles, similar to how themes work currently. We could create a
stylesfolder with sub-folders for each style. Each sub-folder would primarily contain a CSS file, but could also include additional assets like icons, logos, and fonts.The base CSS would define colors, but instance maintainers could make more extensive modifications if desired.
Implementation Example
To illustrate this concept, I've created a working implementation in this branch: GenericMale:custom-styles. Styles are located in
searx/static/styles. For demonstration, I included all catppuccin variants alongside the existing light and dark styles.To achieve this, I removed the top-level
theme-{style}class and instead load the chosen style as a separate file. The "auto" style remains functional, but currently uses hardcoded styles (light & dark). This could be a new setting so it becomes configurable by the instance maintainer.Theme Removal
This approach only makes sense if themes are removed entirely. In other words, the simple theme becomes the general UI, unchangeable by users but still modifiable in forks. I believe this removal is addressed in PR #1188, but it seems like progress has stalled. I'd be happy to contribute to that effort if needed!
Beta Was this translation helpful? Give feedback.
All reactions