recent-posts.html 680 B

123456789101112131415161718192021222324
  1. {{ $sectionID := replace (lower .section.name) " " "-" }}
  2. {{ if .section.id }}
  3. {{ $sectionID = .section.id }}
  4. {{ end }}
  5. {{ $numShow := 3}}
  6. {{ if .section.numShow }}
  7. {{ $numShow = .section.numShow }}
  8. {{ end }}
  9. <div class="container-fluid anchor pb-5 recent-posts-section">
  10. {{ if not (.section.hideTitle) }}
  11. <h1 class="text-center">
  12. <span id="{{ $sectionID }}"></span>{{ .section.name }}</h1>
  13. {{ end }}
  14. <div class="container">
  15. <div class="row" id="recent-post-cards">
  16. {{ range first $numShow (where site.RegularPages.ByDate.Reverse "Type" "in" "posts" )}}
  17. {{ partial "cards/recent-post.html" . }}
  18. {{ end }}
  19. </div>
  20. </div>
  21. </div>