Fix critical mobile optimizations for iPhone
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:
2025-09-19 01:16:44 +02:00
parent 32b3083b77
commit 2d6ec4e432
4 changed files with 39 additions and 4 deletions

View File

@@ -3,9 +3,16 @@
@tailwind components; @tailwind components;
@tailwind utilities; @tailwind utilities;
/* Smooth Scroll Behavior */ /* Smooth Scroll Behavior and iOS Overscroll Prevention */
html { html {
scroll-behavior: smooth; scroll-behavior: smooth;
overscroll-behavior-y: contain;
-webkit-overflow-scrolling: touch;
}
body {
overscroll-behavior-y: contain;
-webkit-overflow-scrolling: touch;
} }
/* Accessibility: Reduced Motion */ /* Accessibility: Reduced Motion */
@@ -237,6 +244,17 @@ html {
max-width: 280px; max-width: 280px;
margin: 20px auto; 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 { .gradient-warm {

View File

@@ -397,6 +397,9 @@ html {
height: 100vh; height: 100vh;
min-height: 600px; min-height: 600px;
overflow: hidden; overflow: hidden;
/* Prevent iOS overscroll bounce */
overscroll-behavior-y: none;
-webkit-overflow-scrolling: touch;
} }
.hero-video-container { .hero-video-container {
@@ -424,6 +427,13 @@ html {
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
z-index: -1; z-index: -1;
opacity: 1;
transition: opacity 0.5s ease-in-out;
}
.hero-image-fallback.fade-out {
opacity: 0;
pointer-events: none;
} }
.hero-overlay { .hero-overlay {
@@ -1415,6 +1425,11 @@ html {
transition: var(--transition); transition: var(--transition);
opacity: 1; opacity: 1;
visibility: visible; visibility: visible;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
margin: 0 auto;
} }
/* Non-featured card buttons */ /* Non-featured card buttons */

View File

@@ -7,8 +7,10 @@
loop loop
muted muted
playsinline playsinline
preload="metadata"
poster="/golden_gate.jpg"
class="hero-video" class="hero-video"
@loadeddata="handleVideoLoaded" @canplaythrough="handleVideoLoaded"
> >
<source <source
src="https://videos.pexels.com/video-files/3571264/3571264-uhd_2560_1440_30fps.mp4" src="https://videos.pexels.com/video-files/3571264/3571264-uhd_2560_1440_30fps.mp4"
@@ -17,8 +19,8 @@
</video> </video>
<div <div
v-if="!videoLoaded"
class="hero-image-fallback" class="hero-image-fallback"
:class="{ 'fade-out': videoLoaded }"
:style="{ backgroundImage: 'url(/golden_gate.jpg)' }" :style="{ backgroundImage: 'url(/golden_gate.jpg)' }"
/> />

View File

@@ -118,7 +118,7 @@ export default defineNuxtConfig({
title: 'Harbor Smith - Personalized Service Maintenance For Your Boat', title: 'Harbor Smith - Personalized Service Maintenance For Your Boat',
meta: [ meta: [
{ charset: 'utf-8' }, { 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: 'description', content: 'Professional boat maintenance services in San Francisco Bay. Mobile service at your dock.' },
{ name: 'format-detection', content: 'telephone=no' } { name: 'format-detection', content: 'telephone=no' }
], ],