Skip to content

Commit

Permalink
chore: Improve header and slow down PageMarquee
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoRCD committed Feb 11, 2025
1 parent b92c325 commit 3046c86
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
22 changes: 17 additions & 5 deletions app/components/AppHeader.vue
Original file line number Diff line number Diff line change
@@ -1,27 +1,39 @@
<script setup lang="ts">
const route = useRoute()

Check failure on line 2 in app/components/AppHeader.vue

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, 22)

'route' is assigned a value but never used. Allowed unused vars must match /^_/u
const nuxtApp = useNuxtApp()
const { activeHeadings, updateHeadings } = useScrollspy()
const items = computed(() => [{
label: 'Features',
to: '#features',
active: route.hash === '#features'
active: activeHeadings.value.includes('features') && !activeHeadings.value.includes('templates')
}, {
label: 'Templates',
to: '#templates',
active: route.hash === '#templates'
active: activeHeadings.value.includes('templates') && !activeHeadings.value.includes('pricing')
}, {
label: 'Pricing',
to: '#pricing',
active: route.hash === '#pricing'
active: activeHeadings.value.includes('pricing') && !activeHeadings.value.includes('testimonials')
}, {
label: 'Testimonials',
to: '#testimonials',
active: route.hash === '#testimonials'
active: activeHeadings.value.includes('testimonials') && !activeHeadings.value.includes('faq')
}, {
label: 'FAQ',
to: '#faq',
active: route.hash === '#faq'
active: activeHeadings.value.includes('faq')
}])
nuxtApp.hooks.hookOnce('page:finish', () => {
updateHeadings([
document.querySelector('#features'),
document.querySelector('#templates'),
document.querySelector('#pricing'),
document.querySelector('#testimonials'),
document.querySelector('#faq')
])
})
</script>

<template>
Expand Down
5 changes: 4 additions & 1 deletion app/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ const isDark = computed(() => useColorMode().value == 'dark')
id="testimonials"
v-bind="page.testimonials"
>
<UPageMarquee pause-on-hover>
<UPageMarquee
pause-on-hover
class="[--duration:50s]"
>
<img
v-for="(logo, index) in page.logos"
:key="index"
Expand Down
2 changes: 1 addition & 1 deletion content/index.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: Nuxt UI Pro - Landing template
description: Nuxt UI Pro is a collection of premium Vue components built on top of Nuxt UI to create beautiful & responsive Nuxt applications in minutes.
hero:
title: Build you landing with Nuxt UI Pro
title: Build your landing with Nuxt UI Pro
description: Nuxt UI Pro is a collection of premium Vue components built on top of Nuxt UI to create beautiful & responsive Nuxt applications in minutes. It includes all primitives to build landing pages, documentations, blogs, dashboards or entire SaaS products.
links:
- label: Get started
Expand Down

0 comments on commit 3046c86

Please sign in to comment.