feat(webui): add Tailwind build system and refactor frontend architecture
- Replace Tailwind CDN with local build (PostCSS + autoprefixer + daisyui) - Add CSS build scripts with automatic prepare hook on npm install - Create account-actions.js service layer with unified response format - Extend ErrorHandler.withLoading() for automatic loading state management - Add skeleton screens for initial load, silent refresh for subsequent updates - Implement loading animations for async operations (buttons, modals) - Improve empty states and add ARIA labels for accessibility - Abstract component styles using @apply (buttons, badges, inputs) - Add JSDoc documentation for Dashboard modules - Update README and CLAUDE.md with development guidelines
This commit is contained in:
@@ -9,57 +9,10 @@
|
||||
|
||||
<!-- Libraries -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<link href="https://cdn.jsdelivr.net/npm/daisyui@4.12.14/dist/full.min.css" rel="stylesheet" type="text/css" />
|
||||
<script src="https://cdn.tailwindcss.com?plugins=forms"></script>
|
||||
<!-- Alpine.js must be deferred so stores register their listeners first -->
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
||||
|
||||
<!-- Custom Config -->
|
||||
<script>
|
||||
tailwind.config = {
|
||||
darkMode: 'class',
|
||||
theme: {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
mono: ['"JetBrains Mono"', '"Fira Code"', 'Consolas', 'monospace'],
|
||||
sans: ['Inter', 'system-ui', 'sans-serif']
|
||||
},
|
||||
colors: {
|
||||
// Deep Space Palette
|
||||
space: {
|
||||
950: 'var(--color-space-950)', // Deep background
|
||||
900: 'var(--color-space-900)', // Panel background
|
||||
850: 'var(--color-space-850)', // Hover states
|
||||
800: 'var(--color-space-800)', // UI elements
|
||||
border: 'var(--color-space-border)'
|
||||
},
|
||||
neon: {
|
||||
purple: 'var(--color-neon-purple)',
|
||||
cyan: 'var(--color-neon-cyan)',
|
||||
green: 'var(--color-neon-green)',
|
||||
yellow: 'var(--color-neon-yellow)',
|
||||
red: 'var(--color-neon-red)'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
daisyui: {
|
||||
themes: [{
|
||||
antigravity: {
|
||||
"primary": "var(--color-neon-purple)", // Neon Purple
|
||||
"secondary": "var(--color-neon-green)", // Neon Green
|
||||
"accent": "var(--color-neon-cyan)", // Neon Cyan
|
||||
"neutral": "var(--color-space-800)", // space-800
|
||||
"base-100": "var(--color-space-950)", // space-950
|
||||
"info": "var(--color-neon-cyan)",
|
||||
"success": "var(--color-neon-green)",
|
||||
"warning": "var(--color-neon-yellow)",
|
||||
"error": "var(--color-neon-red)",
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<!-- Compiled Tailwind CSS (includes DaisyUI) -->
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
</head>
|
||||
|
||||
@@ -354,6 +307,7 @@
|
||||
<script src="js/config/constants.js"></script>
|
||||
<script src="js/utils.js"></script>
|
||||
<script src="js/utils/error-handler.js"></script>
|
||||
<script src="js/utils/account-actions.js"></script>
|
||||
<script src="js/utils/validators.js"></script>
|
||||
<script src="js/utils/model-config.js"></script>
|
||||
<!-- 2. Alpine Stores (register alpine:init listeners) -->
|
||||
|
||||
Reference in New Issue
Block a user