From 636228ff04d7f0227a169439ba28a52762735bcc Mon Sep 17 00:00:00 2001 From: Ronny Date: Sat, 11 Apr 2026 18:59:00 +0200 Subject: [PATCH] feat: add bottom navigation bar (mobile-first) Fixed bottom nav with Home/Spiele/Rangliste/Profil tabs. Desktop keeps header nav. Admin hidden behind gear icon. Main content padded to avoid overlap with bottom nav. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/App.module.css | 27 +++++++++++ frontend/src/App.tsx | 12 +++-- frontend/src/components/BottomNav.module.css | 47 ++++++++++++++++++++ frontend/src/components/BottomNav.tsx | 29 ++++++++++++ frontend/src/global.d.ts | 6 +++ 5 files changed, 117 insertions(+), 4 deletions(-) create mode 100644 frontend/src/components/BottomNav.module.css create mode 100644 frontend/src/components/BottomNav.tsx diff --git a/frontend/src/App.module.css b/frontend/src/App.module.css index d301e70..4b91282 100644 --- a/frontend/src/App.module.css +++ b/frontend/src/App.module.css @@ -96,5 +96,32 @@ max-width: 1100px; margin: 0 auto; padding: 32px 24px; + padding-bottom: 70px; width: 100%; } + +@media (min-width: 768px) { + .main { + padding-bottom: 32px; + } +} + +/* Hide header nav on mobile */ +@media (max-width: 767px) { + .nav { + display: none; + } +} + +/* Admin link: icon only, subtle */ +.adminLink { + display: flex; + align-items: center; + padding: 4px; + color: var(--text-muted); + text-decoration: none; + transition: color 0.2s; +} +.adminLink:hover { + color: var(--text-secondary); +} diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 4d88f4a..6d1731d 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,10 +1,11 @@ import { useState, useEffect } from 'react'; import { Routes, Route, NavLink } from 'react-router-dom'; -import { Sun, Moon } from 'lucide-react'; +import { Sun, Moon, Settings } from 'lucide-react'; import MatchesPage from './pages/MatchesPage'; import LeaderboardPage from './pages/LeaderboardPage'; import ProfilePage from './pages/ProfilePage'; import AdminPage from './pages/AdminPage'; +import BottomNav from './components/BottomNav'; import styles from './App.module.css'; const IS_DEV = import.meta.env.DEV || import.meta.env.VITE_TEST_MODE === 'true'; @@ -79,7 +80,7 @@ export default function App() { )}