hugo-theme-introduction/layouts/projects/list.html

40 lines
1.7 KiB
HTML
Raw Normal View History

2018-07-01 08:09:29 +00:00
{{ define "main" }}
<div class="container markdown top-pad">
{{ .Content }}
2018-06-26 22:30:17 +00:00
</div>
2018-07-01 08:09:29 +00:00
<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">
2018-07-06 12:27:34 +00:00
<a href="{{ if .Params.external_link }}{{ .Params.external_link }}{{ else }}{{ .Permalink }}{{ end }}">
{{ with .Resources.ByType "image" }}
{{ range first 1 (sort . "Params.weight") }}
{{ $image := .Resize "302x" }}
<img src="{{ $image.Permalink }}" alt ="{{ $image.Name }}">
{{ end }}
{{ end }}
</a>
2018-07-01 08:09:29 +00:00
</figure>
</div>
<div class="card-content has-text-centered top-pad">
2018-07-20 15:27:32 +00:00
<a href="{{ if .Params.external_link }}{{ .Params.external_link }}{{ else }}{{ .Permalink }}{{ end }}">
2018-07-01 08:09:29 +00:00
{{ .Title }}
</a>
</div>
</div>
</div>
2018-07-01 08:09:29 +00:00
{{ end }}
</div>
</div>
2018-06-27 00:33:38 +00:00
</div>
2018-07-01 08:09:29 +00:00
{{ end }}