header.blade.php 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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="flex flex-col">
  3. <div class="text-sm mt-[-10px] mb-[15px] pl-5 text-center">
  4. <?php if (is_user_logged_in()) {
  5. $current_user = wp_get_current_user();
  6. $logout_url = wp_logout_url();
  7. echo "Connecté en tant que " . $current_user->display_name . " | <span class='underline decoration-dotted'><a href='" . esc_url($logout_url) . "'>Se déconnecter</a></span>";
  8. } ?>
  9. </div>
  10. <div class="text-sm flex flex-row flex-nowrap">
  11. <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 whitespace-nowrap">
  12. <?php
  13. $current_user = wp_get_current_user();
  14. $author_id = $current_user->ID;
  15. $revisionary_page = admin_url('admin.php?page=revisionary-q&author=' . $author_id);
  16. echo do_shortcode('[xoo_el_action type="login" change_to="' . $revisionary_page . '" change_to_text="MES CONTRIBUTIONS" text="CONTRIBUER" redirect_to="' . $revisionary_page . '"]');
  17. ?>
  18. </button>
  19. <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>
  20. </div>
  21. </div>
  22. <a class="brand text-center leading-7 whitespace-nowrap" href="{{ home_url('/') }}">
  23. <!-- {!! $siteName !!} -->
  24. <span class="font-caslon uppercase text-2xl">Partition<br></span>
  25. <span class="font-caslon italic text-3xl">Le Livre d'Image<br></span>
  26. <span class="font-caslon text-xl pr-1">de </span><span class="font-caslon text-2xl">Jean-Luc Godard</span>
  27. </a>
  28. <div class="mr-6 w-52">
  29. <input type="search" class="px-4 py-2 rounded bg-jlg-xlight-white text-sm" placeholder="RECHERCHER">
  30. </div>
  31. <div class="z-30 right-6 absolute w-52 max-h-52 border-jlg-light-white border rounded" id="search_results">
  32. <div class="flex flex-row p-3 justify-around items-center h-full text-sm">
  33. <p><span id="result_amount">0</span> occurences</p>
  34. <p class="hidden">Aucune occurence</p>
  35. <div class="flex flex-row">
  36. <img src="<?= get_template_directory_uri(); ?>/resources/assets/icons/arrow_drop_down.svg" alt="arrow down" class="cursor-pointer">
  37. <img src="<?= get_template_directory_uri(); ?>/resources/assets/icons/arrow_drop_up.svg" alt="arrow up" class="cursor-pointer">
  38. </div>
  39. </div>
  40. <div class="text-sm w-full">
  41. </div>
  42. </div>
  43. @if (has_nav_menu('primary_navigation'))
  44. <nav class="nav-primary" aria-label="{{ wp_get_nav_menu_name('primary_navigation') }}">
  45. {!! wp_nav_menu(['theme_location' => 'primary_navigation', 'menu_class' => 'nav', 'echo' => false]) !!}
  46. </nav>
  47. @endif
  48. </header>