Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: optimize theme management #33

Merged
merged 4 commits into from
Dec 30, 2024
Merged

feat: optimize theme management #33

merged 4 commits into from
Dec 30, 2024

Conversation

kiritoko1029
Copy link
Contributor

💻 变更类型 | Change Type

  • feat 优化主题色管理方式

🔀 变更说明 | Description of Change

  • 重构主题色管理结构,将主题相关代码集中到 themes/index.scss
  • 添加环境变量 THEME_COLOR 用于控制主题色
  • 设置 mint 为默认主题色
  • 通过 data-theme 属性动态切换主题
  • README文档添加 THEME_COLOR 的说明

这次改动简化了主题色的管理方式,使得添加新主题时只需要

  1. 创建新的主题文件
  2. 在 themes/index.scss 中导入
  3. 在 apply-theme mixin 中添加对应配置

- Refactor theme management structure by centralizing theme-related code in themes/index.scss
- Add THEME_COLOR environment variable for theme control
- Set mint as default theme
- Enable dynamic theme switching via data-theme attribute

This change simplifies theme management. To add a new theme, you only need to:
1. Create a new theme file
2. Import it in themes/index.scss
3. Add corresponding configuration in apply-theme mixin
# Conflicts:
#	app/config/server.ts
- Introduced a new section for `THEME_COLOR` in README files (English, Chinese, Japanese).
- Explained the customization options for theme colors, including available choices: `coral`, `mint`, `purple`, and `ocean`, with `mint` as the default theme.
Copy link

vercel bot commented Dec 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
chat-gpt-next-web-early-bird ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 29, 2024 6:09am

@Dogtiti Dogtiti merged commit 7b49789 into Dogtiti:main Dec 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants