<?php

/**
 * Template part for displaying posts
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package WordPress
 */

?>
  <article id="post-<?php the_ID(); ?>" <?php post_class('ucla-card ucla-grid_span-2'); ?>>
    <div class="ucla-card__body p-0">

      <?php if (is_singular()) : ?>
        <?php the_title('<h1 class="headline-text__xl">', '</h1>'); ?>
      <?php else : ?>
        <?php the_title(sprintf('<h2 class="ucla-card__title"><a href="%s">', esc_url(get_permalink())), '</a></h2>'); ?>
      <?php endif;
      the_excerpt();
      ?>
    </div>
  </article>