formations.vue 1.7 KB

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