post_li_stream.html 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. {{ $post := . }}
  2. <div class="media stream-item" itemscope itemprop="blogPost" itemtype="http://schema.org/BlogPosting">
  3. <div class="media-body">
  4. <h3 class="article-title mb-0 mt-0" itemprop="headline">
  5. <a href="{{ $post.RelPermalink }}" itemprop="url">{{ $post.Title }}</a>
  6. </h3>
  7. {{ $summary := "" }}
  8. {{ if $post.Params.summary }}
  9. {{ $summary = $post.Params.summary | markdownify }}
  10. {{ else if $post.Truncated }}
  11. {{ $summary = $post.Summary }}
  12. {{ end }}
  13. {{ with $summary }}
  14. <div class="article-style" itemprop="articleBody">
  15. {{ . | truncate 135 }}
  16. </div>
  17. {{ end }}
  18. <div class="stream-meta">
  19. {{ partial "page_metadata" (dict "content" $post "is_list" 1) }}
  20. </div>
  21. </div>
  22. <div class="ml-3">
  23. {{ $resource := ($post.Resources.ByType "image").GetMatch "*featured*" }}
  24. {{ with $resource }}
  25. {{ $image := .Resize "150x" }}
  26. <a href="{{ $post.RelPermalink }}">
  27. <img src="{{ $image.RelPermalink }}" itemprop="image">
  28. </a>
  29. {{end}}
  30. </div>
  31. </div>