post_li.html 982 B

12345678910111213141516171819202122232425262728
  1. {{ $post := .post }}
  2. <div class="article-list-item" itemscope itemprop="blogPost">
  3. {{ $preview := $post.Params.header.preview | default true }}
  4. {{ if and $post.Params.header.image $preview }}
  5. <a href="{{ $post.Permalink }}">
  6. <img src="{{ "/img/" | relURL }}{{ $post.Params.header.image }}" class="article-banner" itemprop="image">
  7. </a>
  8. {{end}}
  9. <h3 class="article-title" itemprop="name">
  10. <a href="{{ $post.Permalink }}" itemprop="url">{{ $post.Title }}</a>
  11. </h3>
  12. {{ partial "article_metadata" (dict "content" $post "is_list" 1) }}
  13. <div class="article-style" itemprop="articleBody">
  14. {{ if $post.Params.summary }}
  15. <p>{{ printf "%s" $post.Params.summary | markdownify }}</p>
  16. {{ else if $post.Truncated }}
  17. {{ $post.Summary }}
  18. {{ else }}
  19. {{ $post.Content }}
  20. {{ end }}
  21. </div>
  22. <p class="read-more">
  23. <a href="{{ $post.Permalink }}" class="btn btn-primary btn-outline">
  24. {{ i18n "continue_reading" }}
  25. </a>
  26. </p>
  27. </div>