<?php
/**
 * aktuality single page
 *
 */
inoby_enqueue_parted_style("aktuality", "post_types");
inoby_enqueue_parted_script("aktuality", "post_types");

$url = get_the_post_thumbnail_url($post);
$term_obj_list = get_the_terms( $post->ID, 'kategoria' );
$terms_string = join(', ', wp_list_pluck($term_obj_list, 'name'));

get_header();
?>

<main id="primary" class="site-main">
  <section class="header">
    <div class="container">
      <div class="row">
        <div class="col-12">
          <div class="title-wrap">
            <h1 class="underlined"><?php the_title(); ?></h1>
          </div>
          <img class="thumbnail" src="<?= $url ?>" alt="<?= get_the_title($post) ?>">
          <div class="meta">
            <?= '<span class="categories">'. $terms_string .'</span>'?>
            <?= '<span class="date">'. get_the_time("d.m.Y") .'</span>' ?>
          </div>
        </div>
      </div>
    </div>
  </section>

  <section class="content">
    <?php the_content(); ?>
  </section>
</main>

<?php get_footer();