john-okeefe
08d45617a7
refactor: Convert template event handlers to Alpine.js
...
Converted all inline onclick/onsubmit handlers to Alpine.js @click/@submit directives and added x-data attributes to template body tags.
Templates updated:
- admin.templ: Added x-data="admin", converted scan/hide buttons
- analytics.templ: Added x-data, converted loadAnalytics button
- api_explorer.templ: Added x-data for API explorer page
- bookshelf.templ: Added x-data, converted library/pagination handlers
- collection_modal.templ: Added x-data for modal components
- collection_rules.templ: Added x-data, converted all rule handlers
- collections.templ: Added x-data, converted navigation/book handlers
- conflicts.templ: Added x-data, converted resolve/dismiss handlers
- header.templ: Converted theme dropdown and user menu handlers
- index.templ: Added x-data for theme/auth
- login.templ: Added x-data for theme switching
- profile.templ: Added x-data, converted delete account
- profile_form.templ: Converted modal close handler
- profile_modal.templ: Added x-data for modal
- progress.templ: Removed script (uses header.logout)
- queue.templ: Added x-data, converted queue handlers
- register.templ: Added x-data for theme
- restore_system_collection_modal.templ: Added x-data
- toast.templ: Converted to x-init with Alpine
- unlinked_books.templ: Added x-data for bulk operations
Dynamic content in devices.templ uses event delegation via data attributes.
2026-03-08 21:36:02 -04:00
john-okeefe
2726455578
refactor: convert docs templates to use TailwindCSS
...
Phase 4+5: Replace custom CSS with Tailwind utility classes
- Remove ~250 lines of custom CSS from docs.templ
- Remove ~120 lines of custom CSS from api_explorer.templ
- Use Tailwind CDN for styling
- Keep only essential CSS:
* CSS variables for theming (--bg-primary, --accent, etc.)
* Custom scrollbar styling
* Mobile sidebar transform transitions
* Smooth scroll behavior
- All layout, spacing, colors, typography now use Tailwind classes
- Mobile-first responsive design with Tailwind breakpoints
- Proper accessibility with aria-labels and semantic HTML
Benefits:
- Consistent design system
- Smaller custom CSS footprint
- Better maintainability
- Follows PROJECT_GUIDELINES.md requirement: TailwindCSS primary
2026-02-02 09:35:37 -05:00