Files
website/apps/website/components/AppNavbar.vue
matt 753876b071
All checks were successful
build-website / build (push) Successful in 1m32s
feat: comprehensive website optimization for performance and mobile
Optimizations implemented:
- Added hardware acceleration for smooth animations (will-change, transform3d)
- Optimized touch targets for mobile (minimum 48x48px)
- Added explicit image dimensions to prevent CLS
- Implemented comprehensive SEO meta tags and Open Graph
- Added structured data for LocalBusiness and Service schemas
- Configured resource hints (preconnect, dns-prefetch, preload)
- Added lazy loading to non-critical images
- Improved button accessibility with touch-action: manipulation

These optimizations improve Core Web Vitals, mobile UX, and SEO visibility.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 11:53:47 +02:00

89 lines
2.1 KiB
Vue

<template>
<nav
id="voyageNav"
:class="['voyage-nav', { scrolled: isScrolled }]"
>
<div class="nav-container">
<div class="nav-brand" @click="scrollToTop" style="cursor: pointer;">
<img
:src="navLogo"
:alt="logoAlt"
class="nav-logo"
id="navLogo"
width="150"
height="50"
>
<span>HARBOR SMITH</span>
</div>
<div class="nav-links">
<a
v-for="link in navLinks"
:key="link.href"
:href="link.href"
class="nav-link"
@click="handleSmoothScroll($event, link.href)"
>
{{ link.label }}
</a>
<a
href="tel:510-701-2535"
class="nav-link nav-cta"
>
Call Now
</a>
</div>
</div>
</nav>
</template>
<script setup lang="ts">
import { ref, computed, onMounted, onBeforeUnmount } from 'vue'
import { useSmoothScroll } from '~/composables/useSmoothScroll'
const { scrollToElement, scrollToTop: smoothScrollToTop } = useSmoothScroll()
const isScrolled = ref(false)
const navLinks = [
{ href: '#services', label: 'Services' },
{ href: '#testimonials', label: 'Testimonials' },
{ href: '#contact', label: 'Contact' }
]
const navLogo = computed(() =>
isScrolled.value ? '/HARBOR-SMITH_navy.png' : '/HARBOR-SMITH-white.png'
)
const logoAlt = computed(() =>
isScrolled.value ? 'Harbor Smith Navy Logo' : 'Harbor Smith White Logo'
)
const handleScroll = () => {
isScrolled.value = window.pageYOffset > 50
}
const handleSmoothScroll = (event: Event, href: string) => {
if (!href.startsWith('#')) {
return
}
event.preventDefault()
scrollToElement(href, 800) // Constant-speed smooth scrolling
}
const scrollToTop = () => {
smoothScrollToTop(800) // Constant-speed smooth scrolling
}
onMounted(() => {
handleScroll()
window.addEventListener('scroll', handleScroll, { passive: true })
})
onBeforeUnmount(() => {
window.removeEventListener('scroll', handleScroll)
})
</script>
<style scoped>
/* Navigation styling handled in voyage-layout.css */
</style>