Skip to content

Build your personal knowledge base with Trilium Notes

client: add color scheme-related variations of the Next theme

Adorian Doran3390a2a968a6
diff --git a/src/public/app/widgets/type_widgets/options/appearance/theme.js b/src/public/app/widgets/type_widgets/options/appearance/theme.js
index df92c38750..ec88cdf8e7 100644
--- a/src/public/app/widgets/type_widgets/options/appearance/theme.js
+++ b/src/public/app/widgets/type_widgets/options/appearance/theme.js
@@ -69,6 +69,8 @@ export default class ThemeOptions extends OptionsWidget {
async optionsLoaded(options) {
const themes = [
{ val: 'next', title: t("theme.triliumnext") },
+ { val: 'next-light', title: t("theme.triliumnext-light") },
+ { val: 'next-dark', title: t("theme.triliumnext-dark") },
{ val: 'light', title: t('theme.light_theme') },
{ val: 'dark', title: t('theme.dark_theme') }
].concat(await server.get('options/user-themes'));
diff --git a/src/public/stylesheets/theme-next-dark.css b/src/public/stylesheets/theme-next-dark.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/src/public/stylesheets/theme-next-light.css b/src/public/stylesheets/theme-next-light.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json
index cb992b5da7..1dbe90aeb8 100644
--- a/src/public/translations/en/translation.json
+++ b/src/public/translations/en/translation.json
@@ -1074,7 +1074,9 @@
"override_theme_fonts_label": "Override theme fonts",
"light_theme": "Light",
"dark_theme": "Dark",
- "triliumnext": "TriliumNext (beta)",
+ "triliumnext": "TriliumNext Beta (Follow system color scheme)",
+ "triliumnext-light": "TriliumNext Beta (Light)",
+ "triliumnext-dark": "TriliumNext Beta (Dark)",
"layout": "Layout",
"layout-vertical-title": "Vertical",
"layout-horizontal-title": "Horizontal",
diff --git a/src/routes/index.ts b/src/routes/index.ts
index 658a47796a..16ddf0f704 100644
--- a/src/routes/index.ts
+++ b/src/routes/index.ts
@@ -68,6 +68,10 @@ function getThemeCssUrl(theme: string, themeNote: BNote | null) {
return `${assetPath}/stylesheets/theme-dark.css`;
} else if (theme === "next") {
return `${assetPath}/stylesheets/theme-next.css`;
+ } else if (theme === "next-light") {
+ return `${assetPath}/stylesheets/theme-next-light.css`;
+ } else if (theme === "next-dark") {
+ return `${assetPath}/stylesheets/theme-next-dark.css`;
} else if (!process.env.TRILIUM_SAFE_MODE && themeNote) {
return `api/notes/download/${themeNote.noteId}`;
} else {