mirror of
https://github.com/zadam/trilium.git
synced 2025-10-25 01:28:57 +02:00
995 B
Vendored
995 B
Vendored
Themes
Server-side
- There are three themes embedded in the application:
light, located insrc\public\stylesheets\theme-light.cssdark, located insrc\public\stylesheets\theme-dark.cssnext, located insrc\public\stylesheets\theme-next.css.
- The default theme is set only once, when the database is created and is managed by
options_init#initNotSyncedOptions.- In the original implementation: On Electron, the choice between
lightanddarkis done based on the OS preference. Otherwise, the theme is alwaysdark. - Now, we always choose
nextas the default theme.
- In the original implementation: On Electron, the choice between
- The theme is served via
src\routes\index.ts, in thegetThemeCssUrlmethod.
Client-side
- The predefined themes are hard-coded in the client in
src\public\app\widgets\type_widgets\options\appearance\theme.js. - The user-defined themes are obtained via a call to the server:
options/user-themes. - The theme retrieval is done via a request.