aboutsummaryrefslogtreecommitdiff
path: root/internal/theme
Commit message (Collapse)AuthorAgeFilesLines
* refactor: Use CSS prefers-color-scheme instead of JS-based theme toggleFuwn2026-01-201-28/+30
|
* fix: Prevent flash of light mode on page loadFuwn2026-01-201-24/+26
| | | | | | | - Default to dark mode by setting class="dark" on html element - Move theme CSS before external stylesheet to prevent flash - Only remove dark class if light mode is explicitly preferred - Add !important to theme variable overrides for precedence
* fix: Use consistent CSS selectors for theme variable overridesFuwn2026-01-201-2/+4
| | | | | | | | Match the same selectors used in GenerateCSS(): - Light mode: :root, :root.light - Dark mode: :root.dark This ensures the override specificity matches the theme variable definitions.
* refactor: Use CSS variable overrides for proper theme integrationFuwn2026-01-201-176/+47
| | | | | | | | | | | | | | | | Instead of trying to override individual Tailwind classes (which was fragile and incomplete), now properly override Kaze's root CSS variables (--bg-primary, --status-ok, etc.) to use OpenCode theme values. This works because style.css already maps all Tailwind classes to these CSS variables, so overriding the variables automatically themes everything. The theme flow is now: 1. OpenCode theme defines: --theme-background, --theme-success, etc. 2. Override CSS redefines: --bg-primary = var(--theme-background), etc. 3. style.css classes use: background: var(--bg-primary), etc. This approach is much cleaner and ensures complete, consistent theming.
* feat: Improve theme CSS mappings for comprehensive stylingFuwn2026-01-201-40/+108
| | | | | | | | | | | | | | | | | Rewrite Tailwind class overrides to be much more comprehensive and accurate: - Page backgrounds (main, panels, cards, badges) - All text colors (primary, muted, status-specific) - Border colors and dividers - Status colors for all states (up, degraded, down, unknown) - Status banners with proper color-mixed backgrounds - Interactive hover states (group headers, monitor cards) - SVG icon colors - Tooltip styling with theme colors - Status indicator dots with proper colors Uses color-mix() for subtle background tints on status banners. Targets exact Tailwind classes used in the actual HTML output.
* fix: Support both single-color and dual-mode theme formatsFuwn2026-01-191-10/+24
| | | | | | | | | Update theme parser to handle both OpenCode theme formats: 1. Dual-mode: {"dark": "color", "light": "color"} - opencode.json 2. Single-color: "color" - ayu.json and other dark-only themes When a single color is provided, use it for both light and dark modes. Fixes parsing error when loading themes like ayu.json.
* feat: Add OpenCode-compatible theme loaderFuwn2026-01-191-0/+287
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