Navigation.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. <!--
  2. Menu Navigation
  3. -->
  4. <template>
  5. <LayoutNavigationTopbar />
  6. <v-row class="menu" v-if="!mdAndDown" style="margin-top: 0 !important;">
  7. <v-col cols="3">
  8. <nuxt-link to="/">
  9. <v-img class="logo" src="/images/logo/navigation-logo.png" />
  10. </nuxt-link>
  11. </v-col>
  12. <v-col cols="9">
  13. <v-menu open-on-hover>
  14. <template v-slot:activator="{ props }">
  15. <nuxt-link v-bind="props" class="link-style"
  16. >Nos logiciels
  17. </nuxt-link>
  18. </template>
  19. <v-list class="menu-list">
  20. <nuxt-link
  21. v-for="software in softwareLinks"
  22. :key="software.name"
  23. :to="software.href"
  24. class="link-styles"
  25. >
  26. <v-list-item>
  27. <v-list-item-title>{{ software.name }}</v-list-item-title>
  28. </v-list-item>
  29. </nuxt-link>
  30. </v-list>
  31. </v-menu>
  32. <v-menu open-on-hover>
  33. <template v-slot:activator="{ props }">
  34. <nuxt-link v-bind="props" class="link-style">Nos services </nuxt-link>
  35. </template>
  36. <v-list>
  37. <nuxt-link
  38. v-for="service in serviceLinks"
  39. :key="service.name"
  40. :to="service.href"
  41. class="link-styles"
  42. >
  43. <v-list-item>
  44. <v-list-item-title>{{ service.name }}</v-list-item-title>
  45. </v-list-item>
  46. </nuxt-link>
  47. </v-list>
  48. </v-menu>
  49. <v-menu open-on-hover>
  50. <template v-slot:activator="{ props }">
  51. <nuxt-link v-bind="props" class="link-style">à propos</nuxt-link>
  52. </template>
  53. <v-list>
  54. <nuxt-link
  55. v-for="info in aboutLinks"
  56. :key="info.name"
  57. :to="info.href"
  58. class="link-styles"
  59. >
  60. <v-list-item>
  61. <v-list-item-title>{{ info.name }}</v-list-item-title>
  62. </v-list-item>
  63. </nuxt-link>
  64. </v-list>
  65. </v-menu>
  66. <nuxt-link class="link-style" to="/actualites">Actualités</nuxt-link>
  67. <nuxt-link class="link-style" to="/nous-contacter">Contact</nuxt-link>
  68. </v-col>
  69. </v-row>
  70. <v-app v-if="mdAndDown" class="navigation-sm">
  71. <v-app-bar app>
  72. <v-app-bar-nav-icon @click="toggleDrawer"></v-app-bar-nav-icon>
  73. <nuxt-link to="/">
  74. <v-img class="logo-md" src="/images/logo/navigation-logo.png" />
  75. </nuxt-link>
  76. <nuxt-link
  77. to="https://admin.opentalent.fr/#/login/"
  78. style="text-decoration: none"
  79. >
  80. <v-btn text>
  81. <v-icon left class="fas fa-user icon"></v-icon>
  82. </v-btn>
  83. </nuxt-link>
  84. <v-btn text>
  85. <v-icon left class="fas fa-phone icon"></v-icon>
  86. </v-btn>
  87. <nuxt-link to="/agenda-culturel" style="text-decoration: none">
  88. <v-btn text>
  89. <v-icon left class="fas fa-calendar icon"></v-icon>
  90. </v-btn>
  91. </nuxt-link>
  92. </v-app-bar>
  93. <!-- Tiroir de navigation principal -->
  94. <v-navigation-drawer v-model="drawer" app>
  95. <v-list nav dense>
  96. <v-list-item
  97. v-for="(item, index) in menuItems"
  98. :key="item.id"
  99. @click="selectMenu(item.id)"
  100. >
  101. <v-list-item-title>
  102. {{ item.label }}
  103. </v-list-item-title>
  104. </v-list-item>
  105. </v-list>
  106. </v-navigation-drawer>
  107. <!-- Tiroir de sous-menu -->
  108. <v-navigation-drawer v-model="subMenuDrawer" app right temporary>
  109. <v-list nav dense>
  110. <v-list-item>
  111. <v-list-item-title @click="closeSubMenu">Retour</v-list-item-title>
  112. </v-list-item>
  113. <nuxt-link
  114. v-for="(subItem, subIndex) in subMenus[currentMenu]"
  115. :key="subIndex"
  116. :to="subItem.href"
  117. style="text-decoration: none !important; color: black"
  118. >
  119. <v-list-item>
  120. <v-list-item-title>{{ subItem.name }}</v-list-item-title>
  121. </v-list-item>
  122. </nuxt-link>
  123. </v-list>
  124. </v-navigation-drawer>
  125. </v-app>
  126. </template>
  127. <script setup lang="ts">
  128. import { useDisplay } from "vuetify";
  129. const { mdAndDown } = useDisplay();
  130. const softwareLinks = ref([
  131. { name: "Opentalent Artist", href: "/opentalent_artist" },
  132. { name: "Opentalent School", href: "/opentalent_school" },
  133. { name: "Opentalent Manager", href: "/opentalent_manager" },
  134. ]);
  135. const serviceLinks = ref([
  136. { name: "Formations", href: "/formations" },
  137. { name: "Webinaires", href: "/webinaires" },
  138. ]);
  139. const aboutLinks = ref([
  140. { name: "Qui sommes-nous", href: "/qui-sommes-nous" },
  141. { name: "Nous rejoindre", href: "/nous-rejoindre" },
  142. ]);
  143. const drawer = ref(false);
  144. const subMenuDrawer = ref(false);
  145. const currentMenu = ref("");
  146. const menuItems = ref([
  147. { id: "logiciels", label: "Nos logiciels" },
  148. { id: "services", label: "Nos services" },
  149. { id: "about", label: "À propos" },
  150. { id: "actualites", label: "Actualités" },
  151. { id: "contact", label: "Contact" },
  152. ]);
  153. const subMenus = ref({
  154. logiciels: [
  155. { name: "Opentalent Artist", href: "/opentalent_artist" },
  156. { name: "Opentalent School", href: "/opentalent_school" },
  157. { name: "Opentalent Manager", href: "/opentalent_manager" },
  158. ],
  159. services: [
  160. { name: "Formations", href: "/formations" },
  161. { name: "Webinaires", href: "/webinaires" },
  162. ],
  163. propos: [
  164. { name: "Qui sommes-nous", href: "/qui-sommes-nous" },
  165. { name: "Nous rejoindre", href: "/nous-rejoindre" },
  166. ],
  167. });
  168. const toggleDrawer = () => {
  169. drawer.value = !drawer.value;
  170. };
  171. const selectMenu = (id) => {
  172. if (subMenus.value[id]) {
  173. currentMenu.value = id;
  174. subMenuDrawer.value = true;
  175. drawer.value = false;
  176. } else {
  177. switch (id) {
  178. case "actualites":
  179. window.location.href = "/actualites";
  180. break;
  181. case "contact":
  182. window.location.href = "/nous-contacter";
  183. break;
  184. }
  185. }
  186. };
  187. const closeSubMenu = () => {
  188. subMenuDrawer.value = false;
  189. drawer.value = true;
  190. };
  191. </script>
  192. <style scoped>
  193. .navigation-sm {
  194. background-color: #ffffff;
  195. position: fixed;
  196. top: 0;
  197. }
  198. /* =============== menu Styles =============== */
  199. .menu {
  200. display: flex;
  201. align-items: center;
  202. background-color: #ffffff;
  203. }
  204. .v-list-item-title {
  205. font-family: "Barlow";
  206. font-style: normal;
  207. font-weight: 500;
  208. font-size: 0.9rem;
  209. letter-spacing: 0.1em;
  210. text-transform: uppercase;
  211. color: #0e2d32;
  212. }
  213. .common-styles {
  214. font-family: "Barlow";
  215. font-style: normal;
  216. font-size: 1.1rem;
  217. padding: 0.1rem;
  218. font-weight: 700;
  219. letter-spacing: 0.1em;
  220. text-transform: uppercase;
  221. color: #0e2d32;
  222. text-decoration: none !important;
  223. }
  224. .link-style {
  225. font-family: "Barlow";
  226. font-style: normal;
  227. font-size: 1rem;
  228. margin-right: 3rem;
  229. font-weight: 700;
  230. letter-spacing: 0.05em;
  231. text-transform: uppercase;
  232. color: #0e2d32;
  233. text-decoration: none !important;
  234. cursor: pointer;
  235. }
  236. .link-styles {
  237. font-family: "Barlow";
  238. font-style: normal;
  239. text-decoration: none !important;
  240. color: #0e2d32;
  241. }
  242. .logo {
  243. height: 8rem;
  244. }
  245. .logo-md {
  246. width: 150px;
  247. height: 300px;
  248. }
  249. .icon {
  250. color: #000000;
  251. }
  252. </style>