nous-rejoindre.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <LayoutNavigation />
  3. <div v-if="shouldShowStickyMenu" id="sticky-menu">
  4. <LayoutUIStickyMenu
  5. :shouldShowStickyMenu="shouldShowStickyMenu"
  6. :squaresData="squaresData"
  7. />
  8. </div>
  9. <JoinUsBanner />
  10. <JoinUsMissions />
  11. <LayoutFooter id="layout-footer" />
  12. </template>
  13. <script setup>
  14. import { ref, onMounted } from "vue";
  15. import { useRouter } from 'vue-router';
  16. const router = useRouter();
  17. const shouldShowStickyMenu = ref(true);
  18. const squaresData = [
  19. {
  20. id: 1,
  21. bgColor: "green-square",
  22. iconClass: "fa-regular fa-comments icon",
  23. text: "Nous contacter",
  24. url: "/nous-contacter",
  25. },
  26. {
  27. id: 2,
  28. bgColor: "green-square",
  29. iconClass: "fa-solid fa-circle-info icon",
  30. text: "Demander une demo",
  31. url: "/nous-contacter",
  32. },
  33. {
  34. id: 3,
  35. bgColor: "green-square",
  36. iconClass: "fa-brands fa-readme icon",
  37. text: "Brochure",
  38. url: "https://www.opentalent.fr/fileadmin/stockage/commercial/plaquettes_commerciales/De%CC%81pliant-school_23.pdf",
  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: 1;
  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>