Skip to content

Commit

Permalink
prevent ios autozoom
Browse files Browse the repository at this point in the history
  • Loading branch information
arily committed Mar 7, 2024
1 parent 98b109c commit 843b74a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ export default defineNuxtConfig({
mode: 'out-in', // default
},
head: {
charset: 'utf-8',
viewport: 'width=device-width, initial-scale=1, maximum-scale=1',
meta: [
{ name: 'apple-mobile-web-app-status-bar-style', content: 'black-translucent' },
],
Expand Down
14 changes: 10 additions & 4 deletions src/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,21 @@ const { status } = useZoomModal()
class="drawer-content zoom-modal-container overflow-x-clip"
:data-l1-status="status"
data-l2-status="hidden"
:style="status !== 'closed' && {
'transform-origin': `center calc(${scrollY} * 1px + 50dvh)`,
}"
:style="
status !== 'closed' && {
'transform-origin': `center calc(${scrollY} * 1px + 50dvh)`,
}
"
>
<NuxtPage />
</NuxtLayout>
<app-footer class="mt-auto" />
<div class="drawer-side z-40">
<label for="app-drawer-toggle" aria-label="Close sidebar" class="drawer-overlay" />
<label
for="app-drawer-toggle"
aria-label="Close sidebar"
class="drawer-overlay"
/>
<ul class="menu p-4 w-80 min-h-full bg-base-200">
<app-nav-items>
<template #start>
Expand Down

0 comments on commit 843b74a

Please sign in to comment.