diff options
| author | Fuwn <[email protected]> | 2026-01-19 23:05:26 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-01-19 23:05:26 -0800 |
| commit | 4cbee4da97dcc2832cd354142aa9909a80070952 (patch) | |
| tree | 338f54b0ee2dd033f5049888b586aa3c77e22c18 /internal/config | |
| parent | fix: Remove duplicate monitor name validation across groups (diff) | |
| download | kaze-4cbee4da97dcc2832cd354142aa9909a80070952.tar.xz kaze-4cbee4da97dcc2832cd354142aa9909a80070952.zip | |
feat: Add OpenCode-compatible theme loader
Add support for loading and applying OpenCode-compatible themes via URL.
Fetches theme JSON, resolves color references, generates CSS variables
and Tailwind class overrides to apply the theme seamlessly.
Features:
- Add theme_url config field under site section
- Fetch and parse OpenCode theme.json format
- Generate CSS custom properties (--theme-*) for all theme colors
- Generate Tailwind class overrides to apply theme colors
- Support both light and dark modes
- Template.CSS type for safe CSS injection
Example usage:
site:
theme_url: "https://raw.githubusercontent.com/anomalyco/opencode/.../opencode.json"
Theme schema: https://opencode.ai/theme.json
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/config.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index f3c35e3..68a88f7 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -40,6 +40,7 @@ type SiteConfig struct { Description string `yaml:"description"` Logo string `yaml:"logo"` Favicon string `yaml:"favicon"` + ThemeURL string `yaml:"theme_url"` // URL to OpenCode-compatible theme JSON } // ServerConfig contains HTTP server settings |