@silverpill
I am serving my favicon from /var/lib/mitra/theme, but where do I find the default theme file that I can copy to the theme folder?
Conversation
Notices
-
FWC (fwc@0.5dollah.click)'s status on Tuesday, 31-Dec-2024 04:47:59 JST FWC -
silverpill (silverpill@mitra.social)'s status on Tuesday, 31-Dec-2024 04:47:58 JST silverpill @fwc You mean assets/custom.css ? This feature is still experimental so there is no example.
It is a simple CSS file. You can put whatever you want there, but the easiest way to get started is to override CSS variables. We have two sets of them, one for light mode and another one for dark mode:
Your custom.css might look like this:
:root { /* Light theme */ --background-color: red; } [data-theme="dark"] { /* Dark theme */ --background-color: green; } -
silverpill (silverpill@mitra.social)'s status on Tuesday, 31-Dec-2024 05:10:35 JST silverpill @fwc This won't work because files like _theme.scss are compiled int CSS and bundled together when you build mitra-web.
The result is something like styles_12abd34.css where checksum changes all the time
-
FWC (fwc@0.5dollah.click)'s status on Tuesday, 31-Dec-2024 05:10:36 JST FWC I was thinking I could have put this file into /var/lib/mitra/theme and have it overwrite the primary theme
https://codeberg.org/silverpill/mitra-web/src/branch/main/src/styles/_theme.scss
-
silverpill (silverpill@mitra.social)'s status on Tuesday, 31-Dec-2024 05:16:45 JST silverpill @fwc ...so I made mitra-web load a special stylesheet from assets/custom.css at runtime
But _theme.scss is useful if you maintain a fork of mitra-web
-