Skip to content

Commit c5e352a

Browse files
committed
Update navigation mobile
1 parent 583b41f commit c5e352a

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

apps/site/src/app/layout.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { createSiteStructuredData } from "@/lib/structured-data";
33
import { getBaseUrl } from "@/lib/url";
44
import "./global.css";
55
import { Inter } from "next/font/google";
6-
import type { Metadata } from "next";
6+
import type { Metadata, Viewport } from "next";
77
import Script from "next/script";
88
import type React from "react";
99
import { SITE_HOME_DESCRIPTION, SITE_HOME_TITLE } from "@/lib/site-metadata";
@@ -22,6 +22,12 @@ const inter = Inter({
2222
variable: "--font-inter",
2323
});
2424

25+
export const viewport: Viewport = {
26+
width: "device-width",
27+
initialScale: 1,
28+
viewportFit: "cover",
29+
};
30+
2531
export const metadata: Metadata = {
2632
metadataBase: new URL(getBaseUrl()),
2733
title: SITE_HOME_TITLE,

packages/ui/src/components/navigation-menu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ function NavigationMobileMenu({
461461
buttonVariant?: "ppg" | "orm";
462462
}) {
463463
return (
464-
<div className="fixed px-0 md:hidden w-screen h-screen pt-22 top-0 left-0 -z-1 bg-background-default flex flex-col justify-between">
464+
<div className="fixed px-0 md:hidden w-screen h-dvh pt-22 top-0 left-0 -z-1 bg-background-default flex flex-col justify-between">
465465
<div className="list pb-[130px] overflow-scroll">
466466
{links.map((link) =>
467467
link.url ? (
@@ -482,7 +482,7 @@ function NavigationMobileMenu({
482482
) : null,
483483
)}
484484
</div>
485-
<div className="h-min-content mx-auto w-full absolute bottom-0 left-0 py-6 px-4 bg-background-default justify-center items-center gap-6 flex flex-col">
485+
<div className="h-min-content mx-auto w-full absolute bottom-0 left-0 pt-6 pb-[calc(1.5rem+env(safe-area-inset-bottom))] px-4 bg-background-default justify-center items-center gap-6 flex flex-col">
486486
<Socials className="flex items-center justify-center" include="all" />
487487
<div className="grid gap-2 grid-cols-2 w-full">
488488
<NavigationMenuItem className="w-full">

0 commit comments

Comments
 (0)