formations.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <LayoutNavigation />
  3. <FormationBanner />
  4. <CommonMenuScroll :menus="menus" class="mb-6" />
  5. <div v-if="shouldShowStickyMenu" id="sticky-menu">
  6. <CommonStickyMenu
  7. :shouldShowStickyMenu="shouldShowStickyMenu"
  8. :squaresData="squaresData"
  9. />
  10. </div>
  11. <FormationPresentation />
  12. <FormationCatalogue />
  13. <FormationOPCA />
  14. <FormationCertification />
  15. <FormationParticipation />
  16. <FormationReviews />
  17. <LayoutFAQ />
  18. <LayoutFooterSolutionsFooter id="layout-footer" />
  19. <LayoutFooter id="layout-footer" />
  20. </template>
  21. <script setup>
  22. import { ref, onMounted } from "vue";
  23. const menus = ref([
  24. { id: "Presentation", label: "Présentation", element: null },
  25. { id: "Catalogue", label: "Catalogue", element: null },
  26. { id: "Financement", label: "Financement", element: null },
  27. { id: "Certification", label: "Certification", element: null },
  28. { id: "Inscription", label: "Inscription", element: null },
  29. { id: "Temoignages", label: "Temoignages", element: null }
  30. ]).value;
  31. const shouldShowStickyMenu = ref(true);
  32. const squaresData = [
  33. {
  34. id: 1,
  35. bgColor: "green-square",
  36. iconClass: "fa-regular fa-comments icon",
  37. text: "Nous contacter",
  38. url: "/nous-contacter",
  39. },
  40. {
  41. id: 4,
  42. bgColor: "darkblue-square",
  43. iconClass: "fa-solid fa-phone icon",
  44. text: "Nous Appeler",
  45. },
  46. ];
  47. onMounted(() => {
  48. const stickyMenu = document.getElementById("sticky-menu");
  49. const footer = document.getElementById("layout-footer");
  50. const observer = new IntersectionObserver(
  51. ([entry]) => {
  52. shouldShowStickyMenu.value = !entry.isIntersecting;
  53. },
  54. {
  55. root: null,
  56. threshold: 0,
  57. }
  58. );
  59. observer.observe(footer);
  60. });
  61. </script>
  62. <style scoped>
  63. #sticky-menu {
  64. position: sticky;
  65. top: 20rem;
  66. z-index: 2;
  67. margin-bottom: -32rem;
  68. float: right;
  69. }
  70. @media (max-width: 1800px) {
  71. #sticky-menu {
  72. top: 16rem;
  73. margin-bottom: -28rem;
  74. }
  75. }
  76. </style>