Added default value.
This commit is contained in:
parent
5bd8863f98
commit
ec7ae56791
1 changed files with 6 additions and 1 deletions
|
@ -3,13 +3,18 @@
|
|||
{{ $sectionID = .section.id }}
|
||||
{{ end }}
|
||||
|
||||
{{ $numShow := 3}}
|
||||
{{ if .section.numShow }}
|
||||
{{ $numShow = .section.numShow }}
|
||||
{{ end }}
|
||||
|
||||
<div class="container-fluid anchor pb-5 recent-posts-section" id="{{ $sectionID }}">
|
||||
{{ if not (.section.hideTitle) }}
|
||||
<h1 class="text-center">{{ .section.name }}</h1>
|
||||
{{ end }}
|
||||
<div class="container">
|
||||
<div class="row" id="recent-post-cards">
|
||||
{{ range first .section.numShow (where site.RegularPages.ByDate.Reverse "Type" "in" "posts" )}}
|
||||
{{ range first $numShow (where site.RegularPages.ByDate.Reverse "Type" "in" "posts" )}}
|
||||
{{ partial "cards/recent-post.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue