Lg.vue 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <!-- Barre de navigation (écran large) -->
  2. <template>
  3. <div>
  4. <LayoutNavigationTopbar />
  5. <v-row class="navigation-lg" style="margin-top: 0 !important;">
  6. <!-- Logo Opentalent -->
  7. <v-col cols="2">
  8. <nuxt-link to="/">
  9. <v-img class="logo" src="/images/logo/navigation-logo.png" />
  10. </nuxt-link>
  11. </v-col>
  12. <!-- Menu principal -->
  13. <v-col cols="10" class="pl-6">
  14. <v-menu
  15. v-for="item in menu"
  16. :key="item.label"
  17. :open-on-hover="true"
  18. >
  19. <template v-slot:activator="{ props }">
  20. <nuxt-link
  21. v-bind="props"
  22. class="menuItem first-level"
  23. :to="item.to"
  24. >
  25. {{ item.label }}
  26. </nuxt-link>
  27. </template>
  28. <v-list
  29. v-if="item.children?.length! > 0"
  30. class="menu-list"
  31. >
  32. <v-list-item
  33. v-for="child in item.children"
  34. :key="child.label"
  35. :to="child.to"
  36. class="menuItem"
  37. >
  38. <v-list-item-title>{{ child.label }}</v-list-item-title>
  39. </v-list-item>
  40. </v-list>
  41. </v-menu>
  42. </v-col>
  43. </v-row>
  44. </div>
  45. </template>
  46. <script setup lang="ts">
  47. import type { PropType } from "@vue/runtime-core";
  48. import type { MainMenuItem } from "~/types/interface";
  49. const props = defineProps({
  50. menu: {
  51. type: Array as PropType<Array<MainMenuItem>>
  52. }
  53. })
  54. </script>
  55. <style scoped lang="scss">
  56. .logo {
  57. height: 100px;
  58. width: 300px;
  59. }
  60. .icon {
  61. color: var(--on-neutral-color);
  62. }
  63. .menuItem, .menuItem .v-list-item-title {
  64. font-weight: 500;
  65. font-size: 0.9rem;
  66. letter-spacing: 0.1em;
  67. text-transform: uppercase;
  68. color: var(--primary-color);
  69. cursor: pointer;
  70. text-decoration: none !important;
  71. }
  72. .navigation-lg {
  73. display: flex;
  74. align-items: center;
  75. background-color: var(--neutral-color);
  76. .menuItem {
  77. padding: 18px;
  78. }
  79. .menuItem.first-level {
  80. font-size: 1.3rem;
  81. margin-right: 1rem;
  82. font-weight: 700;
  83. letter-spacing: 0.05em;
  84. }
  85. }
  86. </style>