nonebot2/website/tailwind.config.ts

56 lines
1.3 KiB
TypeScript
Raw Permalink Normal View History

import typography from "@tailwindcss/typography";
import daisyui from "daisyui";
import themes from "daisyui/src/theming/themes";
const lightTheme = themes.light;
const darkTheme = themes.dark;
function excludeThemeColor(
theme: { [key: string]: string },
exclude: string[]
): { [key: string]: string } {
const newObj: { [key: string]: string } = {};
for (const key in theme) {
if (exclude.includes(key)) continue;
newObj[key] = theme[key]!;
}
return newObj;
}
export default {
plugins: [typography, daisyui],
daisyui: {
base: false,
themes: [
{
2021-12-03 16:21:24 +08:00
light: {
...excludeThemeColor(lightTheme, [
"primary-content",
"secondary-content",
"accent-content",
]),
primary: "#ea5252",
"primary-content": "#ffffff",
secondary: "#ef9fbc",
accent: "#65c3c8",
2021-12-03 16:21:24 +08:00
},
},
{
dark: {
...excludeThemeColor(darkTheme, [
"primary-content",
"secondary-content",
"accent-content",
]),
primary: "#ea5252",
"primary-content": "#ffffff",
secondary: "#ef9fbc",
accent: "#65c3c8",
2021-12-03 16:21:24 +08:00
},
},
],
darkTheme: false,
2021-12-03 16:21:24 +08:00
},
darkMode: ["class", '[data-theme="dark"]'],
2021-12-03 16:21:24 +08:00
};