Navigation.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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: 'Nous rejoindre', to: '/nous-rejoindre' },
  40. ],
  41. },
  42. { label: 'Actualités', to: '/actualites' },
  43. { label: 'Contact', to: '/nous-contacter' },
  44. ]
  45. const layoutStore = useLayoutStore()
  46. const onIntersect = (isIntersecting: boolean) => {
  47. layoutStore.setIsHeaderVisible(isIntersecting)
  48. }
  49. </script>