Navigation.vue 1.4 KB

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