Spaces:
Running
Running
still trying to figure out scrolling mobile error
Browse files- pages/index.js +12 -2
pages/index.js
CHANGED
@@ -291,15 +291,25 @@ export default function Home() {
|
|
291 |
<Head>
|
292 |
<title>Image to Code</title>
|
293 |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
</Head>
|
295 |
-
<div className="bg-white">
|
296 |
<Header />
|
297 |
<ErrorModal
|
298 |
isOpen={showErrorModal}
|
299 |
onClose={() => setShowErrorModal(false)}
|
300 |
/>
|
301 |
|
302 |
-
<div className="
|
303 |
<div className={`flex flex-col md:flex-row gap-4 max-w-6xl mx-auto pb-20 ${!hasStartedGenerating ? 'justify-center' : ''}`}>
|
304 |
<div className={`w-full md:flex-1 py-4 px-3 ${!hasStartedGenerating ? 'md:max-w-2xl mx-auto' : ''}`}>
|
305 |
<section className="flex flex-col bg-gray-100 rounded-2xl p-4">
|
|
|
291 |
<Head>
|
292 |
<title>Image to Code</title>
|
293 |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
|
294 |
+
<style>{`
|
295 |
+
body {
|
296 |
+
position: fixed;
|
297 |
+
top: 0;
|
298 |
+
left: 0;
|
299 |
+
right: 0;
|
300 |
+
bottom: 0;
|
301 |
+
overflow: hidden;
|
302 |
+
}
|
303 |
+
`}</style>
|
304 |
</Head>
|
305 |
+
<div className="fixed inset-0 bg-white mt-[90px] sm:mt-0">
|
306 |
<Header />
|
307 |
<ErrorModal
|
308 |
isOpen={showErrorModal}
|
309 |
onClose={() => setShowErrorModal(false)}
|
310 |
/>
|
311 |
|
312 |
+
<div className="absolute inset-0 top-[57px] sm:top-[73px] overflow-y-auto overscroll-y-contain -webkit-overflow-scrolling-touch">
|
313 |
<div className={`flex flex-col md:flex-row gap-4 max-w-6xl mx-auto pb-20 ${!hasStartedGenerating ? 'justify-center' : ''}`}>
|
314 |
<div className={`w-full md:flex-1 py-4 px-3 ${!hasStartedGenerating ? 'md:max-w-2xl mx-auto' : ''}`}>
|
315 |
<section className="flex flex-col bg-gray-100 rounded-2xl p-4">
|