diff options
Diffstat (limited to 'layouts/home.html')
| -rw-r--r-- | layouts/home.html | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/layouts/home.html b/layouts/home.html index 0c76425..4eed7ad 100644 --- a/layouts/home.html +++ b/layouts/home.html @@ -1,9 +1,20 @@ {{ define "main" }} - {{ .Content }} - {{ range site.RegularPages }} - <section> - <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2> - {{ .Summary }} - </section> - {{ end }} + {{ partial "hero.html" . }} + + <div class="container feed-section"> + <div class="feed-label">Latest</div> + + {{ $posts := where site.RegularPages "Type" "in" (slice "articles") }} + {{ $posts := sort $posts "Params.date" "desc" }} + {{ $latest := first 3 $posts }} + + <div class="feed-grid"> + {{ range $latest }} + {{ $data := dict "title" .Title "type" .Params.type "description" .Summary "date" .Date "url" .RelPermalink "image" .Params.image "featured" .Params.featured }} + {{ partial "post-card.html" $data }} + {{ end }} + </div> + + <a href="/articles/" class="feed-cta">View all articles</a> + </div> {{ end }} |
