index.blade.php 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. @extends('layouts.app')
  2. @section('content')
  3. <div class="fixed left-0 w-8 flex flex-col-reverse z-1" id="timeline_container"></div>
  4. <svg class="fixed left-0 h-4 w-10 mt-[-4px] fill-jlg-white cursor-grab active:cursor-grabbing" id="cursor">
  5. <polygon points="32,4 32,6 40,10 40,0" />
  6. <rect width="32" height="2" y="4" />
  7. </svg>
  8. <table class="w-full bg-jlg-dark-blue flex justify-center mt-[70px] z-0 pl-10 lg:pl-[10px]">
  9. <thead>
  10. <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">
  11. <th class="flex items-end justify-start"></th>
  12. <th class="flex items-end justify-start pb-4">Images</th>
  13. <th class="flex items-end justify-start pb-4">Voix Off et In</th>
  14. <th class="flex items-end justify-start pb-4">Bande Son</th>
  15. <th class="flex items-end justify-start pb-4">Écrits</th>
  16. </tr>
  17. </thead>
  18. <tbody class="w-full mb-48 lg:w-2/3 block bg-jlg-dark-blue">
  19. <?php
  20. $args = array(
  21. 'post_type' => 'post',
  22. 'posts_per_page' => -1,
  23. 'meta_key' => 'Index',
  24. 'meta_type' => 'NUMERIC',
  25. 'orderby' => 'meta_value',
  26. 'order' => 'ASC'
  27. );
  28. $query = new WP_Query($args);
  29. if ($query->have_posts()) :
  30. while ($query->have_posts()) : $query->the_post();
  31. $contenu = get_the_content();
  32. $infosArray = explode("---", $contenu); // Divise le contenu en fonction des séparateurs
  33. // Initialisez des variables pour stocker les informations
  34. $images = isset($infosArray[0]) ? $infosArray[0] : '';
  35. $voixOffIn = isset($infosArray[1]) ? $infosArray[1] : '';
  36. $bandeson = isset($infosArray[2]) ? $infosArray[2] : '';
  37. $ecrits = isset($infosArray[3]) ? $infosArray[3] : '';
  38. //lien pour le crayon
  39. $edit_link = 'https://localhost/wp/wp-admin/admin.php?page=rvy-revisions&post='. get_the_ID() .'&action=revise';
  40. ?>
  41. <tr class="border-jlg-light-white border-b font-authentic-60 w-full flex flex-row py-6 isContentPart">
  42. <td class="block text-sm pl-0 pr-6">{{ the_title()}}</td>
  43. <td class="block pl-0 pr-6"><?php echo $images; ?></td>
  44. <td class="block pl-0 pr-6"><?php echo $voixOffIn; ?></td>
  45. <td class="block pl-0 pr-6"><?php echo $bandeson; ?></td>
  46. <td class="block pl-0 pr-6"><?php echo $ecrits; ?></td>
  47. <td class="block text-sm pl-0 pr-6"><?php if(is_user_logged_in()){ echo '<a href="' . esc_url( $edit_link ) . '" class="edit-button">&#128393;</a>';} elseif (!is_user_logged_in()) { echo '<a href="' . esc_url( $edit_link ) . '" class="edit-button xoo-el-login-tgr ">&#128393;</a>';}?></td>
  48. </tr>
  49. <?php
  50. endwhile;
  51. endif;
  52. wp_reset_postdata();
  53. ?>
  54. </tbody>
  55. </table>
  56. @if (! have_posts())
  57. <x-alert type="warning">
  58. {!! __('Sorry, no results were found.', 'sage') !!}
  59. </x-alert>
  60. {!! get_search_form(false) !!}
  61. @endif
  62. @endsection