feat(frontend): Responsive Smartphone-Oberfläche (Modul 15)
Mobile Bottom-Navigation und permanent erreichbare "+ Neu"- Schnellaktion (Durchsicht/Varroa/Behandlung/Fütterung/Aufgabe/Ernte). Header-Navigation überarbeitet, damit sie bei schmaler Breite intern scrollt statt die Seite horizontal zu sprengen. Verifiziert bei Smartphone- (390px) und Tablet-Breite (820px).
This commit is contained in:
1 parent
166979ff3c
commit
45646833b9
4 files changed
+99
-7
No files matched your search
@@ -5,6 +5,8 @@ import Link from "next/link";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useAuth } from "@/lib/auth/auth-context";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { BottomNav } from "./bottom-nav";
|
||||
import { QuickAddMenu } from "./quick-add-menu";
|
||||
|
||||
export default function AppLayout({ children }: { children: ReactNode }) {
|
||||
const router = useRouter();
|
||||
@@ -22,9 +24,10 @@ export default function AppLayout({ children }: { children: ReactNode }) {
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen flex-col">
|
||||
<header className="flex items-center justify-between border-b px-4 py-3">
|
||||
<nav className="flex items-center gap-4">
|
||||
<span className="font-semibold">ApiCore</span>
|
||||
<header className="flex items-center justify-between gap-3 border-b px-4 py-3">
|
||||
<nav className="flex min-w-0 items-center gap-4 max-sm:gap-2">
|
||||
<span className="shrink-0 font-semibold">ApiCore</span>
|
||||
<div className="hidden min-w-0 items-center gap-4 overflow-x-auto whitespace-nowrap sm:flex">
|
||||
<Link className="text-sm text-muted-foreground hover:text-foreground" href="/dashboard">
|
||||
Dashboard
|
||||
</Link>
|
||||
@@ -60,9 +63,12 @@ export default function AppLayout({ children }: { children: ReactNode }) {
|
||||
Benutzer
|
||||
</Link>
|
||||
) : null}
|
||||
</div>
|
||||
</nav>
|
||||
<div className="flex items-center gap-3 text-sm">
|
||||
<span className="text-muted-foreground">{user.email}</span>
|
||||
<div className="flex shrink-0 items-center gap-3 text-sm">
|
||||
<span className="hidden max-w-40 truncate text-muted-foreground md:inline">
|
||||
{user.email}
|
||||
</span>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
@@ -74,7 +80,9 @@ export default function AppLayout({ children }: { children: ReactNode }) {
|
||||
</Button>
|
||||
</div>
|
||||
</header>
|
||||
<div className="flex-1">{children}</div>
|
||||
<div className="flex-1 pb-16 sm:pb-0">{children}</div>
|
||||
<BottomNav />
|
||||
<QuickAddMenu />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user