Lg.vue 2.2 KB

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