<article @php(post_class('h-entry'))>
  <header>
    <h1 class="p-name">
      {!! $title !!}
    </h1>

    @include('partials.entry-meta')
  </header>


  <div class="e-content">
    @php(the_content())

    <?php 

    $minutage = get_post_meta(get_the_ID(), 'Minutage', true); 
    $images = get_post_meta(get_the_ID(), 'Images', true); 
    $bandeSon = get_post_meta(get_the_ID(), 'BandeSon', true); 
    $voixOffIn = get_post_meta(get_the_ID(), 'VoixOffIn', true);
    $ecrits = get_post_meta(get_the_ID(), 'Ecrits', true);
    
      $listeChamps = [
      [
          'titre' => 'Minutage',
          'contenu' => $minutage,
      ],
      [
          'titre' => 'Images',
          'contenu' =>$images,
      ],
      [
          'titre' => 'Bande Son',
          'contenu' => $bandeSon,
      ],
      [
          'titre' => 'Voix In et Off',
          'contenu' => $voixOffIn,
      ],
      [
          'titre' => 'Ecrits',
          'contenu' => $ecrits,
      ]
      ];
    
    ?>

    <table style="border-collapse: collapse;">
      <tbody>
          @foreach($listeChamps as $champ)
              <tr>
                  <th style="border: 1px solid black; padding: 5px;">{{ $champ['titre'] }}</th>
                  <td style="border: 1px solid black; padding: 5px;">{{ $champ['contenu'] }}</td>
              </tr>
          @endforeach
      </tbody>
    </table>



   
  </div>

  <footer>
    {!! wp_link_pages(['echo' => 0, 'before' => '<nav class="page-nav"><p>' . __('Pages:', 'sage'), 'after' => '</p></nav>']) !!}
  </footer>

  @php(comments_template())
</article>
