mirror of
https://github.com/ivuorinen/everforest-resources.git
synced 2026-01-26 03:04:02 +00:00
- 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
28 lines
799 B
JavaScript
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;
|
|
}
|
|
});
|