<?php
get_header(); ?>
<main <?php post_class('main ucla-grid container has-global-padding'); ?> id="main">
  <?php if (is_home() && !is_front_page() && !empty(single_post_title('', false))) : ?>
  <header class="ucla-content-header">
    <?php get_breadcrumbs() ?>
    <h1 class="headline-text__xl"><?php single_post_title(); ?></h1>
  </header><!-- .page-header -->
  <div class="ucla-content ucla-grid cols-3-md">
  <?php endif;

    if (have_posts()) {

      // Load posts loop.
      while (have_posts()) {
        the_post();
        get_template_part('template-parts/content/content-excerpt');
      }
    } else {

      // If no content, include the "No posts found" template.
      get_template_part('template-parts/content/content-none');
    } ?>
  </div>
  <?php      
    the_posts_pagination( array(
      'type' => 'list',
      'prev_text' => '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><title>Previous Page</title><path d="M14 18L15.41 16.59L10.83 12L15.41 7.41L14 6L8 12L14 18Z" /></svg>',
      'next_text' => '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><title>Next Page</title><path d="M9.41 6L8 7.41L12.58 12L8 16.59L9.41 18L15.41 12L9.41 6Z" /></svg>'
    ) );
  ?>
</main>
<?php get_footer(); ?>