featured-posts.html 711 B

1234567891011121314151617181920212223
  1. {{ $sectionID := replace (lower .section.name) " " "-" }}
  2. {{ if .section.id }}
  3. {{ $sectionID = .section.id }}
  4. {{ end }}
  5. <div class="container-fluid anchor pb-5 recent-posts-section">
  6. {{ if not (.section.hideTitle) }}
  7. <h1 class="text-center">
  8. <span id="{{ $sectionID }}"></span>{{ .section.name }}</h1>
  9. {{ else }}
  10. <h1 class="text-center" style="display: none">
  11. <span id="{{ $sectionID }}"></span>{{ .section.name }}</h1>
  12. {{ end }}
  13. <div class="container">
  14. <div class="row" id="recent-post-cards">
  15. {{ range $post := .posts}}
  16. {{ with site.GetPage $post }}
  17. {{ partial "cards/post.html" . }}
  18. {{ end }}
  19. {{ end }}
  20. </div>
  21. </div>
  22. </div>