post_li_detailed.html 1.2 KB

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