recent-posts.html 660 B

1234567891011121314151617181920212223
  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" id="{{ $sectionID }}">
  10. {{ if not (.section.hideTitle) }}
  11. <h1 class="text-center">{{ .section.name }}</h1>
  12. {{ end }}
  13. <div class="container">
  14. <div class="row" id="recent-post-cards">
  15. {{ range first $numShow (where site.RegularPages.ByDate.Reverse "Type" "in" "posts" )}}
  16. {{ partial "cards/recent-post.html" . }}
  17. {{ end }}
  18. </div>
  19. </div>
  20. </div>