hugo-theme-introduction/layouts/projects/list.html
2018-07-01 10:09:29 +02:00

34 lines
1.5 KiB
HTML

{{ define "main" }}
<div class="container markdown top-pad">
{{ .Content }}
</div>
<div class="container">
<div class="section is-small">
<div class="columns is-multiline">
{{ $numberOfPages := len .Pages}}
{{ range .Pages.ByWeight }}
{{ if eq (mod $numberOfPages 2) 0 }}
<div class="column is-half">
{{ else }}
<div class="column is-one-third">
{{ end }}
<div class="card">
<div class="card-image">
<figure class="image is-3by2">
<a href="{{ if .Params.external_link }}{{ .Params.external_link }}{{ else }}{{.Permalink}}{{ end }}">
<img src="{{ if .Params.image }}{{ .Params.image | relURL }}{{ else }}{{ (.Site.Params.placeHolderimg | default "/img/workday.jpg") | relURL }}{{ end }}" alt="{{ .Title }}">
</a>
</figure>
</div>
<div class="card-content has-text-centered top-pad">
<a href="{{ if .Params.external_link }}{{ .Params.external_link }}{{ else }}{{.Permalink}}{{ end }}">
{{ .Title }}
</a>
</div>
</div>
</div>
{{ end }}
</div>
</div>
</div>
{{ end }}