Lg.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. >
  25. {{ item.label }}
  26. </nuxt-link>
  27. </template>
  28. <v-list v-if="item.children?.length! > 0" class="menu-list">
  29. <v-list-item
  30. v-for="child in item.children"
  31. :key="child.label"
  32. :to="child.to"
  33. class="menuItem"
  34. >
  35. <v-list-item-title>{{ child.label }}</v-list-item-title>
  36. </v-list-item>
  37. </v-list>
  38. </v-menu>
  39. </v-col>
  40. </v-row>
  41. </div>
  42. </template>
  43. <script setup lang="ts">
  44. import type { PropType } from 'vue'
  45. import type { MainMenuItem } from '~/types/interface'
  46. defineProps({
  47. menu: {
  48. type: Array as PropType<Array<MainMenuItem>>,
  49. required: true,
  50. },
  51. })
  52. </script>
  53. <style scoped lang="scss">
  54. .logo {
  55. height: 100px;
  56. width: 300px;
  57. }
  58. .icon {
  59. color: var(--on-neutral-color);
  60. }
  61. .menuItem,
  62. .menuItem .v-list-item-title {
  63. font-weight: 500;
  64. font-size: 0.9rem;
  65. letter-spacing: 0.1em;
  66. text-transform: uppercase;
  67. color: var(--primary-color);
  68. cursor: pointer;
  69. text-decoration: none !important;
  70. }
  71. .navigation-lg {
  72. display: flex;
  73. align-items: center;
  74. background-color: var(--neutral-color);
  75. .menuItem {
  76. padding: 18px;
  77. }
  78. .menuItem.first-level {
  79. font-size: 1.3rem;
  80. margin-right: 1rem;
  81. font-weight: 700;
  82. letter-spacing: 0.05em;
  83. }
  84. }
  85. </style>