50 lines
1.7 KiB
HTML
50 lines
1.7 KiB
HTML
{{ partial "header.html" . }}
|
|
<section class="main">
|
|
<div class="container">
|
|
<div class="content">
|
|
{{ range where .Data.Pages "Title" "Home" }}
|
|
<div class="markdown">
|
|
{{ .Content }}
|
|
</div>
|
|
{{ end }}
|
|
|
|
{{ if isset .Site.Params "latestpostcount" }}
|
|
<div class="posts">
|
|
{{ $nbPosts := len (where .Data.Pages "Section" "blog") }}
|
|
{{ if gt $nbPosts 0 }}
|
|
<div class="page-heading">Latest posts</div>
|
|
<ul>
|
|
{{ range (first .Site.Params.latestpostcount .Pages).GroupByDate "Jan, 2006" "desc" }}
|
|
<li class="groupby">{{ .Key }}</li>
|
|
{{ range .Pages.ByPublishDate.Reverse }}
|
|
{{ partial "li.html" . }}
|
|
{{ end }}
|
|
{{ end }}
|
|
</ul>
|
|
|
|
{{ if gt $nbPosts .Site.Params.latestpostcount }}
|
|
<a href="./blog/" class="see-more">See more ...</a>
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
{{ end }}
|
|
|
|
<div class="best-posts">
|
|
{{ $nbPosts := len (where .Data.Pages "Params.best" true) }}
|
|
{{ if gt $nbPosts 0 }}
|
|
<div class="page-heading">Best posts</div>
|
|
<ul>
|
|
{{ range .Data.Pages.ByPublishDate.Reverse }}
|
|
{{ if eq .Params.best true }}
|
|
{{ partial "li.html" . }}
|
|
{{ end }}
|
|
{{ end }}
|
|
</ul>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{{ partial "footer.html" . }}
|
|
|