Navigation.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <!--
  2. Menu Navigation
  3. -->
  4. <template>
  5. <div v-intersect="onIntersect">
  6. <!-- Navigation (écran large) -->
  7. <div class="lg-and-up">
  8. <LayoutNavigationLg :menu="menu" />
  9. </div>
  10. <!-- Navigation (petit écran) -->
  11. <div class="md-and-down">
  12. <LayoutNavigationMd :menu="menu" />
  13. </div>
  14. </div>
  15. </template>
  16. <script setup lang="ts">
  17. import type { MainMenuItem } from '~/types/interface'
  18. import { useLayoutStore } from '~/stores/layoutStore'
  19. const menu: Array<MainMenuItem> = [
  20. {
  21. label: 'Nos logiciels',
  22. children: [
  23. { label: 'Opentalent Artist', to: '/opentalent-artist' },
  24. { label: 'Opentalent School', to: '/opentalent-school' },
  25. { label: 'Opentalent Manager', to: '/opentalent-manager' },
  26. ],
  27. },
  28. {
  29. label: 'Nos services',
  30. children: [
  31. { label: 'Formations', to: '/formations' },
  32. { label: 'Webinaires', to: '/webinaires' },
  33. ],
  34. },
  35. {
  36. label: 'À propos',
  37. children: [
  38. { label: 'Qui sommes-nous', to: '/qui-sommes-nous' },
  39. { label: 'Nos partenaires', to: '/nos-partenaires' },
  40. { label: 'Nous rejoindre', to: '/nous-rejoindre' },
  41. ],
  42. },
  43. { label: 'Actualités', to: '/actualites' },
  44. { label: 'Contact', to: '/nous-contacter' },
  45. ]
  46. const layoutStore = useLayoutStore()
  47. const onIntersect = (isIntersecting: boolean) => {
  48. layoutStore.setIsHeaderVisible(isIntersecting)
  49. }
  50. </script>