footer.blade.php 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <footer class="fixed w-full h-[8vh] py-4 bottom-0 bg-jlg-dark-blue border-t border-jlg-light-white flex justify-between">
  2. <!-- @php(dynamic_sidebar('sidebar-footer'))-->
  3. <div class="text-sm">
  4. <button class="px-4 py-2 rounded-md ml-6 underline underline-offset-8 hover:underline-offset-4 active:underline-offset-8" onclick="displayAboutPopup()" id="about_button">À PROPOS</button>
  5. <button class="px-4 py-2 rounded-md ml-6 underline underline-offset-8 hover:underline-offset-4 active:underline-offset-8"><a href="mailto:<?php echo get_option('admin_email') ?>">CONTACT</a></button>
  6. </div>
  7. <div class="mr-6 flex items-center">
  8. <a href="https://www.thalim.cnrs.fr/?lang=fr" target="_blank" class="w-12 mr-4">
  9. <img class="w-full h-auto" alt="thalim" src="<?= get_template_directory_uri(); ?>/resources/assets/images/logos/thalim.png">
  10. </a>
  11. <a href="http://www.univ-paris3.fr/" target="_blank" class="w-24 mr-4">
  12. <img class="w-full h-auto" alt="sorbonne" src="<?= get_template_directory_uri(); ?>/resources/assets/images/logos/sorbonne.png">
  13. </a>
  14. <a href="https://www.cnrs.fr/fr" target="_blank" class="w-12 mr-4">
  15. <img class="w-full h-auto" alt="cnrs" src="<?= get_template_directory_uri(); ?>/resources/assets/images/logos/cnrs.png">
  16. </a>
  17. <a href="https://www.huma-num.fr/" target="_blank" class="w-12">
  18. <img class="w-full h-auto" alt="humanum" src="<?= get_template_directory_uri(); ?>/resources/assets/images/logos/huma-num.png">
  19. </a>
  20. </div>
  21. </footer>
  22. <script>
  23. // Define the event listener function
  24. function closeAboutPopupHandler(event) {
  25. event.preventDefault();
  26. console.log(event.target);
  27. if (
  28. event.target != document.querySelector('#about_modale') &&
  29. event.target != document.querySelector('#about_button') &&
  30. event.target != document.querySelector('#about_title') &&
  31. event.target != document.querySelector('#about_content') &&
  32. event.target.parentElement != document.querySelector('#about_content') &&
  33. (event.target.tagName != "EM" && event.target.parentElement.parentElement != document.querySelector('#about_content'))
  34. ) {
  35. closeAboutPopup();
  36. }
  37. }
  38. // Attach the event listener in the displayAboutPopup function
  39. function displayAboutPopup() {
  40. document.getElementById('about_popup').style.display = 'flex';
  41. setTimeout(() => {
  42. document.getElementById('about_popup').style.opacity = '1';
  43. window.addEventListener('click', closeAboutPopupHandler);
  44. }, 1);
  45. document.body.style.overflow = 'hidden';
  46. }
  47. // Remove the event listener in the closeAboutPopup function
  48. function closeAboutPopup() {
  49. document.getElementById('about_popup').style.opacity = '0';
  50. setTimeout(() => {
  51. document.getElementById('about_popup').style.display = 'none';
  52. }, 300);
  53. document.body.style.overflowY = 'scroll';
  54. // Remove the event listener
  55. window.removeEventListener('click', closeAboutPopupHandler);
  56. }
  57. </script>