mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
feat(theme): start implementing a theme for TriliumNext
This commit is contained in:
@@ -41,6 +41,7 @@ export default class ThemeOptions extends OptionsWidget {
|
|||||||
|
|
||||||
async optionsLoaded(options) {
|
async optionsLoaded(options) {
|
||||||
const themes = [
|
const themes = [
|
||||||
|
{ val: 'next', title: t("theme.triliumnext") },
|
||||||
{ val: 'light', title: t('theme.light_theme') },
|
{ val: 'light', title: t('theme.light_theme') },
|
||||||
{ val: 'dark', title: t('theme.dark_theme') }
|
{ val: 'dark', title: t('theme.dark_theme') }
|
||||||
].concat(await server.get('options/user-themes'));
|
].concat(await server.get('options/user-themes'));
|
||||||
|
|||||||
0
src/public/stylesheets/theme-next.css
Normal file
0
src/public/stylesheets/theme-next.css
Normal file
@@ -1061,7 +1061,8 @@
|
|||||||
"theme_label": "Theme",
|
"theme_label": "Theme",
|
||||||
"override_theme_fonts_label": "Override theme fonts",
|
"override_theme_fonts_label": "Override theme fonts",
|
||||||
"light_theme": "Light",
|
"light_theme": "Light",
|
||||||
"dark_theme": "Dark"
|
"dark_theme": "Dark",
|
||||||
|
"triliumnext": "TriliumNext"
|
||||||
},
|
},
|
||||||
"zoom_factor": {
|
"zoom_factor": {
|
||||||
"title": "Zoom Factor (desktop build only)",
|
"title": "Zoom Factor (desktop build only)",
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ function getThemeCssUrl(theme: string) {
|
|||||||
return false; // light theme is always loaded as baseline
|
return false; // light theme is always loaded as baseline
|
||||||
} else if (theme === 'dark') {
|
} else if (theme === 'dark') {
|
||||||
return `${assetPath}/stylesheets/theme-dark.css`;
|
return `${assetPath}/stylesheets/theme-dark.css`;
|
||||||
|
} else if (theme === "next") {
|
||||||
|
return `${assetPath}/stylesheets/theme-next.css`;
|
||||||
} else {
|
} else {
|
||||||
const themeNote = attributeService.getNoteWithLabel('appTheme', theme);
|
const themeNote = attributeService.getNoteWithLabel('appTheme', theme);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user