header.blade.php 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <header class="border-b border-jlg-light-white py-4 h-1/12 shadow-xlg fixed top-0 w-full bg-jlg-dark-blue flex flex-row justify-between items-center z-10">
  2. <div class="text-sm">
  3. <button class="bg-jlg-xlight-white hover:bg-jlg-hxlight-white active:bg-jlg-axlight-white px-4 py-2 rounded-full border-jlg-hxlight-white border ml-6 transition-colors">
  4. <?php
  5. $current_user = wp_get_current_user();
  6. $author_id = $current_user->ID;
  7. $revisionary_page = admin_url('admin.php?page=revisionary-q&author=' . $author_id);
  8. $link = sprintf(
  9. '<a href="%s">MES CONTRIBUTIONS</a>',
  10. esc_url($revisionary_page)
  11. );
  12. echo do_shortcode('[xoo_el_action type="login" change_to="' . $revisionary_page . '" change_to_text="MES CONTRIBUTIONS" text="CONTRIBUER" redirect_to="' . $revisionary_page . '"]');
  13. ?>
  14. </button>
  15. <button class="bg-jlg-xlight-white hover:bg-jlg-hxlight-white active:bg-jlg-axlight-white px-4 py-2 rounded-full border-jlg-hxlight-white border ml-6 transition-colors"><a href="<?php echo esc_url(home_url('/?format=csv')); ?>">EXPORT</a></button>
  16. </div>
  17. <a class="brand text-center text-2xl leading-none" href="{{ home_url('/') }}">
  18. <!-- {!! $siteName !!} -->
  19. <span class="font-caslon uppercase">Partition<br></span>
  20. <span class="font-caslon italic">Le Livre d'Image</span>
  21. </a>
  22. <div class="mr-6 w-52">
  23. <input type="search" class="px-4 py-2 rounded bg-jlg-xlight-white text-sm" placeholder="RECHERCHER">
  24. </div>
  25. <div class="z-30 right-6 absolute w-52 max-h-52 border-jlg-light-white border rounded" id="search_results">
  26. <div class="flex flex-row p-3 justify-around items-center h-full text-sm">
  27. <p><span id="result_amount">0</span> occurences</p>
  28. <p class="hidden">Aucune occurence</p>
  29. <div class="flex flex-row">
  30. <img src="<?= get_template_directory_uri(); ?>/resources/assets/icons/arrow_drop_down.svg" alt="arrow down" class="cursor-pointer">
  31. <img src="<?= get_template_directory_uri(); ?>/resources/assets/icons/arrow_drop_up.svg" alt="arrow up" class="cursor-pointer">
  32. </div>
  33. </div>
  34. <div class="text-sm w-full">
  35. </div>
  36. </div>
  37. @if (has_nav_menu('primary_navigation'))
  38. <nav class="nav-primary" aria-label="{{ wp_get_nav_menu_name('primary_navigation') }}">
  39. {!! wp_nav_menu(['theme_location' => 'primary_navigation', 'menu_class' => 'nav', 'echo' => false]) !!}
  40. </nav>
  41. @endif
  42. </header>
  43. <script>
  44. setTimeout(() => {
  45. const privacyLink = document.querySelector('.xoo-aff-checkbox_single a');
  46. privacyLink.addEventListener('click', function (e) {
  47. e.preventDefault();
  48. });
  49. }, 1000);
  50. </script>