Files
everforest-resources/web/demo/demo.js
Ismo Vuorinen 11baabe545 feat: initial scaffold and generator
- Complete project structure with directories for all target platforms
- Template system for CLI tools with color placeholder replacement
- Working generator that processes templates for 6 theme variants
- GitHub workflows for build, snapshots, commitlint, and cli-verify
- Installer and verifier scripts for CLI tool deployment
- Comprehensive documentation and specifications
- Biome 2.x linting and formatting setup
- Husky git hooks for pre-commit validation
2025-09-05 23:06:12 +03:00

28 lines
799 B
JavaScript

// Everforest Demo JavaScript
document.addEventListener('DOMContentLoaded', function() {
const themeControls = document.querySelectorAll('input[name="theme"]');
const body = document.body;
// Theme switching functionality
themeControls.forEach(control => {
control.addEventListener('change', function() {
const theme = this.value;
// Remove existing theme attributes
body.removeAttribute('data-theme');
// Apply new theme
if (theme !== 'auto') {
body.setAttribute('data-theme', theme);
}
});
});
// Initialize with auto theme
const autoControl = document.querySelector('input[value="auto"]');
if (autoControl) {
autoControl.checked = true;
}
});