{{ $post := .post }}

<div class="card-simple" itemscope itemprop="blogPost" itemtype="http://schema.org/BlogPosting">
  {{ partial "article_metadata" (dict "content" $post "is_list" 1) }}

  {{ $preview := $post.Params.header.preview | default true }}
  {{ if and $post.Params.header.image $preview }}
  <a href="{{ $post.RelPermalink }}">
    {{ $img_src := urls.Parse $post.Params.header.image }}
    {{ if $img_src.Scheme }}
      <img src="{{ $post.Params.header.image }}" class="article-banner" itemprop="image">
    {{ else }}
      <img src="{{ "/img/" | relURL }}{{ $post.Params.header.image }}" class="article-banner" itemprop="image">
    {{ end }}
  </a>
  {{end}}
  <h3 class="article-title" itemprop="headline">
    <a href="{{ $post.RelPermalink }}" itemprop="url">{{ $post.Title }}</a>
  </h3>
  <div class="article-style" itemprop="articleBody">
    {{ if $post.Params.summary }}
    <p>{{ printf "%s" $post.Params.summary | markdownify }}</p>
    {{ else if $post.Truncated }}
    {{ $post.Summary }}
    {{ else }}
    {{ $post.Content }}
    {{ end }}
  </div>
  <p class="read-more" itemprop="mainEntityOfPage">
    <a href="{{ $post.RelPermalink }}" class="btn btn-outline-primary my-1">
      {{ i18n "continue_reading" }}
    </a>
  </p>
</div>
