webinaires.vue 1.5 KB

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