feat: migrate login form to template with Pico CSS styling
Move login form from inline HTML in oauth.go to dedicated template file
at internal/web/templates/pages/login.html, styled with Pico CSS to match
the rest of the application.
Changes:
- Created LoginPageData struct in internal/models/page_data.go for template data
- Created login.html template with three-block structure (title, nav, content)
- Updated Login handler to render template instead of inline HTML
- Added Handle field to TemplateData for form repopulation after errors
- Added StartOAuthFlow method to OAuthManager for cleaner API
- Deprecated HandleOAuthLogin method in favor of handlers.Login
- Preserved 100% OAuth functional parity
The login form now:
- Uses Pico CSS for professional, consistent styling
- Displays validation errors in styled article blocks
- Repopulates handle field after validation errors
- Maintains responsive design across all screen sizes
- Follows same template patterns as export.html and dashboard.html
All tests pass. Manual testing confirmed:
- Page loads correctly with Pico CSS styling
- Handle input field displays and accepts input
- HTML5 validation works (required field)
- Server-side validation displays errors correctly
- Form repopulates handle after validation errors
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>