Add themes that can be base

This commit is contained in:
SiriusXT 2025-03-08 14:58:19 +08:00
parent 1e81831ea0
commit e2c317f59c
2 changed files with 7 additions and 3 deletions

View File

@ -37,7 +37,7 @@ function index(req: Request, res: Response) {
device: view,
csrfToken: csrfToken,
themeCssUrl: getThemeCssUrl(theme, themeNote),
themeUseNextAsBase: themeNote?.getAttributeValue("label", "appThemeBase") === "next",
themeUseNextAsBase: themeNote?.getAttributeValue("label", "appThemeBase"),
headingStyle: options.headingStyle,
layoutOrientation: options.layoutOrientation,
platform: process.platform,

View File

@ -53,8 +53,12 @@
<link href="<%= themeCssUrl %>" rel="stylesheet">
<% } %>
<% if (themeUseNextAsBase) { %>
<link href="<%= assetPath %>/stylesheets/theme-next.css" rel="stylesheet">
<% if (themeUseNextAsBase === "next") { %>
<link href="<%= assetPath %>/stylesheets/theme-next.css" rel="stylesheet">
<% } else if (themeUseNextAsBase === "next-dark") { %>
<link href="<%= assetPath %>/stylesheets/theme-next-dark.css" rel="stylesheet">
<% } else if (themeUseNextAsBase === "next-light") { %>
<link href="<%= assetPath %>/stylesheets/theme-next-light.css" rel="stylesheet">
<% } %>
<link href="<%= assetPath %>/stylesheets/style.css" rel="stylesheet">