feat: Complete design foundation with responsive navigation
Deploy Development / deploy (push) Failing after 26s
Deploy Development / deploy (push) Failing after 26s
Design System: - app.css already exists with full design tokens, dark mode, responsive breakpoints - CSS variables for colors, spacing, typography - Mobile-first layout with safe-area support (iOS notch) Navigation System: - config/appNav.js: Single source of truth for navigation items - Bottom-Nav for mobile (<1024px) with horizontal scrolling - DesktopSidebar for desktop (≥1024px) with fixed left sidebar - Role-based navigation (isAdmin adds Admin link) App.jsx Restructure: - Responsive layout: Bottom-Nav (mobile) + DesktopSidebar (desktop) - Protected/Public routes with loading states - Logout handler with confirmation PWA Setup: - viewport-fit=cover for notch support - apple-mobile-web-app meta tags - Icon links prepared (icons pending) Architecture: - Follows Mitai design patterns - Responsive breakpoint at 1024px - Single source of truth for navigation config Next: Icons, Exercise CRUD, Clubs/Groups Management
This commit is contained in:
1 parent
edb33b8fc3
commit
46a90ae910
4 files changed
+211
-9
No files matched your search
@@ -0,0 +1,48 @@
|
||||
import {
|
||||
LayoutDashboard,
|
||||
BookOpen,
|
||||
Calendar,
|
||||
Building2,
|
||||
Settings,
|
||||
Shield
|
||||
} from 'lucide-react'
|
||||
|
||||
/**
|
||||
* Shinkan Navigation Configuration
|
||||
* Single source of truth für Bottom-Nav (Mobile) + Desktop-Sidebar
|
||||
*
|
||||
* @typedef {{ to: string, label: string, shortLabel?: string, end?: boolean, Icon: import('react').ForwardRefExoticComponent }} AppNavItem
|
||||
*/
|
||||
|
||||
/** @returns {Omit<AppNavItem, 'Icon'>[]} */
|
||||
function baseItems() {
|
||||
return [
|
||||
{ to: '/', label: 'Übersicht', end: true },
|
||||
{ to: '/exercises', label: 'Übungen', shortLabel: 'Übungen' },
|
||||
{ to: '/planning', label: 'Planung' },
|
||||
{ to: '/clubs', label: 'Vereine' },
|
||||
{ to: '/settings', label: 'Einstellungen', shortLabel: 'Einst.' }
|
||||
]
|
||||
}
|
||||
|
||||
/** @param {boolean} isAdmin */
|
||||
export function getMainNavItems(isAdmin) {
|
||||
const icons = [
|
||||
LayoutDashboard,
|
||||
BookOpen,
|
||||
Calendar,
|
||||
Building2,
|
||||
Settings
|
||||
]
|
||||
|
||||
const raw = baseItems().map((item, i) => ({
|
||||
...item,
|
||||
Icon: icons[i]
|
||||
}))
|
||||
|
||||
if (isAdmin) {
|
||||
raw.push({ to: '/admin', label: 'Admin', end: false, Icon: Shield })
|
||||
}
|
||||
|
||||
return raw
|
||||
}
|
||||
Reference in new issue
Block a user