index.blade.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. @extends('layouts.app')
  2. @section('content')
  3. <div id="about_popup">
  4. <div id="about_modale">
  5. <span class="xoo-el-icon-cancel-circle" aria-hidden="true" onclick="closeAboutPopup()"></span>
  6. <div id="about_title">
  7. À propos
  8. </div>
  9. <div id="about_content">
  10. <?php echo apply_filters('the_content', get_post(9962)->post_content) ?>
  11. </div>
  12. </div>
  13. </div>
  14. <div id="content_search_tag" style="display: none;"><?php echo apply_filters('the_content', get_post(13943)->post_content) ?></div>
  15. <div id="content_login_popup" style="display: none;"><?php echo apply_filters('the_content', get_post(9960)->post_content) ?></div>
  16. <div id="content_privacy" style="display: none;"><?php echo apply_filters('the_content', get_post(3)->post_content) ?></div>
  17. <div class="fixed left-0 w-8 flex flex-col-reverse z-1" id="timeline_container"></div>
  18. <svg class="fixed left-0 h-4 w-10 mt-[-4px] fill-jlg-white cursor-grab active:cursor-grabbing" id="cursor">
  19. <polygon points="32,4 32,6 40,10 40,0" />
  20. <rect width="32" height="2" y="4" />
  21. </svg>
  22. <table class="w-full bg-jlg-dark-blue flex justify-center mt-[70px] z-0 pl-10 lg:pl-[10px] pr-[96px] lg:pr-0">
  23. <thead>
  24. <tr class="border-jlg-white border-b h-64 top-0 w-full lg:w-2/3 fixed z-0 flex items-stretch justify-around text-left uppercase bg-jlg-dark-blue pr-[130px] lg:pr-0">
  25. <th class="flex items-end justify-start"></th>
  26. <th class="flex items-end justify-start pb-4">Images</th>
  27. <th class="flex items-end justify-start pb-4">Voix Off et In</th>
  28. <th class="flex items-end justify-start pb-4">Bande Son</th>
  29. <th class="flex items-end justify-start pb-4">Écrits</th>
  30. </tr>
  31. </thead>
  32. <tbody class="w-full mb-48 lg:w-2/3 block bg-jlg-dark-blue">
  33. <?php
  34. $args = array(
  35. 'post_type' => 'post',
  36. 'posts_per_page' => -1,
  37. 'meta_key' => 'index',
  38. 'meta_type' => 'NUMERIC',
  39. 'orderby' => 'meta_value',
  40. 'order' => 'ASC'
  41. );
  42. $query = new WP_Query($args);
  43. if ($query->have_posts()) :
  44. while ($query->have_posts()) : $query->the_post();
  45. if (get_post_meta(get_the_ID(), 'isMainPart', true)) { ?>
  46. <tr class="border-jlg-white border-b font-authentic-90 uppercase w-full flex flex-row py-6 isMainPart">
  47. <td class="pl-0 flex">
  48. <div class="w-2 h-5 bg-jlg-white mr-3"></div>
  49. <div>{{ get_post_meta(get_the_ID(), 'isMainPart', true) }}</div>
  50. </td>
  51. </tr>
  52. <?php } elseif (get_post_meta(get_the_ID(), 'isSubPart', true)) { ?>
  53. <tr class="border-jlg-white border-b font-authentic-90 w-full flex flex-row py-6 isSubPart">
  54. <td class="pl-0 flex">
  55. <div class="w-2 h-5 bg-jlg-white mr-3"></div>
  56. <div>{{ get_post_meta(get_the_ID(), 'isSubPart', true) }}</div>
  57. </td>
  58. </tr>
  59. <?php } else {
  60. $contenu = wpautop(get_the_content());
  61. $infosArray = explode("---", $contenu); // Divise le contenu en fonction des séparateurs
  62. // Initialisez des variables pour stocker les informations
  63. $images = isset($infosArray[1]) ? $infosArray[1] : '';
  64. $images = substr($images, 0, -21);
  65. $voixOffIn = isset($infosArray[2]) ? $infosArray[2] : '';
  66. $voixOffIn = substr($voixOffIn, 0, -16);
  67. $bandeson = isset($infosArray[3]) ? $infosArray[3] : '';
  68. $bandeson = substr($bandeson, 0, -14);
  69. $ecrits = isset($infosArray[4]) ? $infosArray[4] : '';
  70. //lien pour le crayon
  71. $edit_link = site_url('/wp-admin/admin.php?page=rvy-revisions&post=' . get_the_ID() . '&action=revise');
  72. ?>
  73. <tr class="border-jlg-light-white border-b font-authentic-60 w-full flex flex-row py-6 isContentPart">
  74. <td class="block text-sm pl-0 pr-6">{{ the_title()}}</td>
  75. <td class="block pl-0 pr-6"><?php echo $images; ?></td>
  76. <td class="block pl-0 pr-6"><?php echo $voixOffIn; ?></td>
  77. <td class="block pl-0 pr-6"><?php echo $bandeson; ?></td>
  78. <td class="block pl-0 pr-6"><?php echo $ecrits; ?></td>
  79. <td class="block text-sm pl-0 pr-6">
  80. <?php if(is_user_logged_in()){
  81. echo '<a title="Contribution" href="' . esc_url( $edit_link ) . '" class="edit-button">'; ?>
  82. <img src="<?= get_template_directory_uri(); ?>/resources/assets/icons/pen_icon.svg" alt="icon pen" /></a>
  83. <?php } elseif (!is_user_logged_in()) {
  84. echo '<img src="' . get_template_directory_uri() . '/resources/assets/icons/pen_icon.svg" alt="icon pen" />';
  85. echo do_shortcode('[xoo_el_action type="login" text="Connexion" redirect_to="' . $edit_link . '"]');
  86. }?>
  87. </td>
  88. </tr>
  89. <?php }
  90. // endif;
  91. endwhile;
  92. endif;
  93. wp_reset_postdata();
  94. ?>
  95. </tbody>
  96. </table>
  97. @if (! have_posts())
  98. <x-alert type="warning">
  99. {!! __('Sorry, no results were found.', 'sage') !!}
  100. </x-alert>
  101. {!! get_search_form(false) !!}
  102. @endif
  103. @endsection