Skip to content

Commit 4cffc50

Browse files
authoredMar 8, 2025
Merge pull request #1361 from TriliumNext/themeUseNextAsBase
Theme use next as base
2 parents 1e81831 + 1a54b8f commit 4cffc50

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed
 

‎src/public/translations/en/translation.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@
376376
"auto_read_only_disabled": "text/code notes can be set automatically into read mode when they are too large. You can disable this behavior on per-note basis by adding this label to the note",
377377
"app_css": "marks CSS notes which are loaded into the Trilium application and can thus be used to modify Trilium's looks.",
378378
"app_theme": "marks CSS notes which are full Trilium themes and are thus available in Trilium options.",
379-
"app_theme_base": "set to \"next\" in order to use the TriliumNext theme as a base for a custom theme instead of the legacy one.",
379+
"app_theme_base": "set to \"next\", \"next-light\", or \"next-dark\" to use the corresponding TriliumNext theme (auto, light or dark) as the base for a custom theme, instead of the legacy one.",
380380
"css_class": "value of this label is then added as CSS class to the node representing given note in the tree. This can be useful for advanced theming. Can be used in template notes.",
381381
"icon_class": "value of this label is added as a CSS class to the icon on the tree which can help visually distinguish the notes in the tree. Example might be bx bx-home - icons are taken from boxicons. Can be used in template notes.",
382382
"page_size": "number of items per page in note listing",

‎src/routes/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function index(req: Request, res: Response) {
3737
device: view,
3838
csrfToken: csrfToken,
3939
themeCssUrl: getThemeCssUrl(theme, themeNote),
40-
themeUseNextAsBase: themeNote?.getAttributeValue("label", "appThemeBase") === "next",
40+
themeUseNextAsBase: themeNote?.getAttributeValue("label", "appThemeBase"),
4141
headingStyle: options.headingStyle,
4242
layoutOrientation: options.layoutOrientation,
4343
platform: process.platform,

‎src/views/desktop.ejs

+6-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,12 @@
5353
<link href="<%= themeCssUrl %>" rel="stylesheet">
5454
<% } %>
5555

56-
<% if (themeUseNextAsBase) { %>
57-
<link href="<%= assetPath %>/stylesheets/theme-next.css" rel="stylesheet">
56+
<% if (themeUseNextAsBase === "next") { %>
57+
<link href="<%= assetPath %>/stylesheets/theme-next.css" rel="stylesheet">
58+
<% } else if (themeUseNextAsBase === "next-dark") { %>
59+
<link href="<%= assetPath %>/stylesheets/theme-next-dark.css" rel="stylesheet">
60+
<% } else if (themeUseNextAsBase === "next-light") { %>
61+
<link href="<%= assetPath %>/stylesheets/theme-next-light.css" rel="stylesheet">
5862
<% } %>
5963

6064
<link href="<%= assetPath %>/stylesheets/style.css" rel="stylesheet">

0 commit comments

Comments
 (0)