Lg.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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
  10. src="/images/logos/opentalent/Logo_Opentalent-gris.png"
  11. alt="Logo Opentalent - Agenda et logiciels culturels"
  12. class="logo ml-4"
  13. />
  14. </nuxt-link>
  15. </v-col>
  16. <!-- Menu principal -->
  17. <v-col cols="10" class="pl-6">
  18. <v-menu v-for="item in menu" :key="item.label" :open-on-hover="true">
  19. <template #activator="{ props }">
  20. <nuxt-link
  21. v-bind="props"
  22. class="menuItem first-level"
  23. :to="item.to"
  24. role="link"
  25. >
  26. {{ item.label }}
  27. </nuxt-link>
  28. </template>
  29. <v-list v-if="item.children?.length! > 0" class="menu-list">
  30. <v-list-item
  31. v-for="child in item.children"
  32. :key="child.label"
  33. :to="child.to"
  34. class="menuItem"
  35. >
  36. <v-list-item-title>{{ child.label }}</v-list-item-title>
  37. </v-list-item>
  38. </v-list>
  39. </v-menu>
  40. </v-col>
  41. </v-row>
  42. </div>
  43. </template>
  44. <script setup lang="ts">
  45. import type { PropType } from 'vue'
  46. import type { MainMenuItem } from '~/types/interface'
  47. defineProps({
  48. menu: {
  49. type: Array as PropType<Array<MainMenuItem>>,
  50. required: true,
  51. },
  52. })
  53. </script>
  54. <style scoped lang="scss">
  55. .logo {
  56. height: 100px;
  57. width: 300px;
  58. }
  59. .icon {
  60. color: var(--on-neutral-color);
  61. }
  62. .menuItem,
  63. .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. margin-top: 0 !important;
  74. display: flex;
  75. align-items: center;
  76. background-color: var(--neutral-color);
  77. .menuItem {
  78. padding: 18px;
  79. }
  80. .menuItem.first-level {
  81. font-size: 1.3rem;
  82. margin-right: 1rem;
  83. font-weight: 700;
  84. letter-spacing: 0.05em;
  85. }
  86. }
  87. </style>