From 0a3e1e999de532c81a1916edf420e060fc8ebb0e Mon Sep 17 00:00:00 2001 From: drl990114 Date: Sat, 2 Mar 2024 14:22:34 +0800 Subject: [PATCH] fix: theme --- .dumirc.ts | 3 ++- package.json | 2 +- src/Theme/dark.ts | 4 ++++ src/Theme/light.ts | 4 ++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.dumirc.ts b/.dumirc.ts index 3883df6..c71cea1 100644 --- a/.dumirc.ts +++ b/.dumirc.ts @@ -5,6 +5,7 @@ let publicPath: string | undefined; // Github Pages 部署时需要更换为自己的仓库名 if (process.env.NODE_ENV === 'production' && process.env.PREVIEW !== '1') { + console.log('production') base = '/zens/'; publicPath = '/zens/'; } @@ -20,7 +21,7 @@ export default defineConfig({ atomDirs: [{ type: 'component', dir: 'src' }], }, themeConfig: { - logo: '/logo.png', + logo: (publicPath || '') + '/logo.png', lastUpdated: true, socialLinks: { github: 'https://github.com/drl990114/zens', diff --git a/package.json b/package.json index e78cf8a..d7b8dc3 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ ], "scripts": { "build": "npm run clean && npm run build:types && gulp", - "build:site": "dumi build", + "build:site": "cross-env NODE_ENV=production dumi build", "build:types": "tsc -p tsconfig.build.json && cpr lib esm", "clean": "rimraf lib esm dist .dumi/tmp doc-site", "commit": "cz", diff --git a/src/Theme/dark.ts b/src/Theme/dark.ts index 46a1c52..6552cb9 100644 --- a/src/Theme/dark.ts +++ b/src/Theme/dark.ts @@ -14,4 +14,8 @@ export const styledDarkTheme = { // components contextMenuBgColor: '#1E1F20', contextMenuBgColorHover: '#1552B3', + buttonBgColor: '#21262c', + tooltipBgColor: '#43414A', + dialogBgColor: '#05010d', + dialogBackdropColor: 'rgb(18, 18, 18, 0.7)', } diff --git a/src/Theme/light.ts b/src/Theme/light.ts index f0d06fa..e706431 100644 --- a/src/Theme/light.ts +++ b/src/Theme/light.ts @@ -14,4 +14,8 @@ export const styledLightTheme = { // components contextMenuBgColor: '#f6f7f9', contextMenuBgColorHover: '#1552B3', + buttonBgColor: '#f6f7f9', + tooltipBgColor: '#d7d7dc', + dialogBgColor: '#f6f7f9', + dialogBackdropColor: 'rgba(220, 220, 220, 0.4)', }