Skip to content

Commit 29554d1

Browse files
authored
Improve iOS UX (#207)
* Disable zoom on mobile * Fix iOS homebar overlapping * chore: Auto-fix lint errors * Trigger CI
1 parent 04254db commit 29554d1

File tree

5 files changed

+19
-2
lines changed

5 files changed

+19
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
"prettier-plugin-tailwindcss": "0.5.11",
9898
"server-only": "0.0.1",
9999
"tailwind-merge": "2.2.1",
100+
"tailwindcss-safe-area": "0.5.1",
100101
"ts-jest": "29.1.2",
101102
"ts-toolbelt": "9.6.0",
102103
"webpack": "5.90.1"

pnpm-lock.yaml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/[locale]/layout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ const poppins = Poppins({
2525

2626
export const viewport: Viewport = {
2727
themeColor: '#5F797A',
28+
maximumScale: 1,
29+
userScalable: false,
2830
}
2931

3032
export async function generateMetadata({
@@ -68,7 +70,7 @@ const RootLayout: FC<RootLayoutProps> = async ({
6870
inter.className,
6971
poppins.variable,
7072
inter.variable,
71-
'bg-stone-50',
73+
'bg-stone-50 p-safe',
7274
])}
7375
>
7476
<AxiomWebVitals />

src/components/navbar/bottom-navbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const BottomNavbarInner: FC<{
3232
return (
3333
<nav
3434
className={cn(
35-
'fixed inset-x-0 bottom-0 z-50 h-14 border-t border-stone-200 bg-white shadow-xl',
35+
'fixed inset-x-0 bottom-0 z-50 box-content h-14 border-t border-stone-200 bg-white shadow-xl pb-safe',
3636
className
3737
)}
3838
>

tailwind.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { nextui } from '@nextui-org/react'
44
import typography from '@tailwindcss/typography'
55
import tailwindScrollbarHide from 'tailwind-scrollbar-hide'
6+
import tailwindcssSafeArea from 'tailwindcss-safe-area'
67
import defaultTheme from 'tailwindcss/defaultTheme'
78
import plugin from 'tailwindcss/plugin'
89
import { allColorClasses } from './src/helpers/color-classes'
@@ -79,6 +80,7 @@ const config = {
7980
nextui(),
8081
typography,
8182
tailwindScrollbarHide,
83+
tailwindcssSafeArea,
8284
plugin(function ({ matchUtilities, theme }) {
8385
matchUtilities(
8486
{

0 commit comments

Comments
 (0)