Fix critical mobile optimizations for iPhone
All checks were successful
build-website / build (push) Successful in 1m29s
All checks were successful
build-website / build (push) Successful in 1m29s
- Update viewport meta to prevent zoom-out issues - Add video preload and smooth fallback transitions - Implement iOS overscroll bounce prevention - Center service offering buttons properly - Add mobile-specific padding and touch target sizing - Optimize video loading with canplaythrough event - Add fade-out transition for fallback image 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -3,9 +3,16 @@
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
/* Smooth Scroll Behavior */
|
||||
/* Smooth Scroll Behavior and iOS Overscroll Prevention */
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
overscroll-behavior-y: contain;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
body {
|
||||
overscroll-behavior-y: contain;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
/* Accessibility: Reduced Motion */
|
||||
@@ -237,6 +244,17 @@ html {
|
||||
max-width: 280px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
/* Reduce hero padding on mobile */
|
||||
.hero-content {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
/* Ensure touch targets are at least 44x44px */
|
||||
button, .btn-primary-warm, .btn-secondary-warm {
|
||||
min-height: 44px;
|
||||
min-width: 44px;
|
||||
}
|
||||
}
|
||||
|
||||
.gradient-warm {
|
||||
|
||||
@@ -397,6 +397,9 @@ html {
|
||||
height: 100vh;
|
||||
min-height: 600px;
|
||||
overflow: hidden;
|
||||
/* Prevent iOS overscroll bounce */
|
||||
overscroll-behavior-y: none;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.hero-video-container {
|
||||
@@ -424,6 +427,13 @@ html {
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
z-index: -1;
|
||||
opacity: 1;
|
||||
transition: opacity 0.5s ease-in-out;
|
||||
}
|
||||
|
||||
.hero-image-fallback.fade-out {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.hero-overlay {
|
||||
@@ -1415,6 +1425,11 @@ html {
|
||||
transition: var(--transition);
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Non-featured card buttons */
|
||||
|
||||
@@ -7,8 +7,10 @@
|
||||
loop
|
||||
muted
|
||||
playsinline
|
||||
preload="metadata"
|
||||
poster="/golden_gate.jpg"
|
||||
class="hero-video"
|
||||
@loadeddata="handleVideoLoaded"
|
||||
@canplaythrough="handleVideoLoaded"
|
||||
>
|
||||
<source
|
||||
src="https://videos.pexels.com/video-files/3571264/3571264-uhd_2560_1440_30fps.mp4"
|
||||
@@ -17,8 +19,8 @@
|
||||
</video>
|
||||
|
||||
<div
|
||||
v-if="!videoLoaded"
|
||||
class="hero-image-fallback"
|
||||
:class="{ 'fade-out': videoLoaded }"
|
||||
:style="{ backgroundImage: 'url(/golden_gate.jpg)' }"
|
||||
/>
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ export default defineNuxtConfig({
|
||||
title: 'Harbor Smith - Personalized Service Maintenance For Your Boat',
|
||||
meta: [
|
||||
{ charset: 'utf-8' },
|
||||
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
||||
{ name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=5, user-scalable=yes' },
|
||||
{ name: 'description', content: 'Professional boat maintenance services in San Francisco Bay. Mobile service at your dock.' },
|
||||
{ name: 'format-detection', content: 'telephone=no' }
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user