index.blade.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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]">
  23. <thead>
  24. <tr class="border-jlg-white border-b h-64 top-0 lg:w-2/3 fixed z-0 flex items-stretch justify-around text-left uppercase bg-jlg-dark-blue">
  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 = 'https://localhost/wp/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">&#128393;</a>';
  82. } elseif (!is_user_logged_in()) {
  83. echo '<a href="' . esc_url( $edit_link ) . '" class="edit-button xoo-el-login-tgr ">&#128393;</a>';
  84. }?>
  85. </td>
  86. </tr>
  87. <?php }
  88. // endif;
  89. endwhile;
  90. endif;
  91. wp_reset_postdata();
  92. ?>
  93. </tbody>
  94. </table>
  95. @if (! have_posts())
  96. <x-alert type="warning">
  97. {!! __('Sorry, no results were found.', 'sage') !!}
  98. </x-alert>
  99. {!! get_search_form(false) !!}
  100. @endif
  101. @endsection