fix: Mobile hamburger menu and iPad sidebar visibility
Mobile fixes: - Add click toggle handler for hamburger menu (was hover-only) - Menu now opens/closes on tap and closes when clicking outside - Keep hover support for desktop iPad fixes: - Sidebar content now visible on touch devices (901-1280px) - Added (hover: hover) media query to prevent hide-on-hover on tablets Security improvements: - Replace exec.CommandContext with go-git library for git operations - Add path traversal and command injection prevention - Fix race condition in template hot reload - Add environment-based cookie Secure flag Code quality: - Add constants.go for magic numbers - Remove unused code (ParsePreferenceToggleRequest, DomainError) - Add FOUC prevention with inline critical CSS - Add Makefile dev/run/clean targets - Fix README git clone URL - Add doc/DECISIONS.md for architectural decisions Tests: - Add hamburger menu click toggle tests - Add iPad sidebar visibility tests - Update security tests for go-git implementation - Add cookie Secure flag tests
This commit is contained in:
@@ -84,21 +84,6 @@ func ParsePDFExportRequest(r *http.Request) (*PDFExportRequest, error) {
|
||||
return req, nil
|
||||
}
|
||||
|
||||
// PreferenceToggleRequest represents a toggle request with language context
|
||||
type PreferenceToggleRequest struct {
|
||||
Lang string // Current language from query or cookie
|
||||
}
|
||||
|
||||
// ParsePreferenceToggleRequest parses toggle request parameters
|
||||
func ParsePreferenceToggleRequest(r *http.Request, defaultLang string) *PreferenceToggleRequest {
|
||||
lang := r.URL.Query().Get("lang")
|
||||
if lang == "" {
|
||||
lang = defaultLang
|
||||
}
|
||||
|
||||
return &PreferenceToggleRequest{Lang: lang}
|
||||
}
|
||||
|
||||
// ==============================================================================
|
||||
// RESPONSE TYPES
|
||||
// Structured response types for consistent API responses
|
||||
|
||||
Reference in New Issue
Block a user