added optional showcase section to home page
This commit is contained in:
parent
38a8b48e8c
commit
3176229a6b
4 changed files with 44 additions and 0 deletions
17
layouts/partials/showcase.html
Normal file
17
layouts/partials/showcase.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{{ if .Site.Params.showcaseDir }}
|
||||
{{ $showcasePosts := where site.RegularPages "Section" "in" .Site.Params.showcaseDir }}
|
||||
{{ range (sort $showcasePosts "File.LogicalName") }}
|
||||
{{ if in .Dir .Site.Params.showcaseDir }}
|
||||
<div class="showcaseCard {{if .Site.Params.discreteCards }}discrete{{ end }}">
|
||||
<div>
|
||||
<h1>{{ .Title }}</h1>
|
||||
<div>{{ .Content }}</div>
|
||||
</div>
|
||||
{{ if .Params.image }}
|
||||
<img src="{{ .Params.image }}" />
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<hr />
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue