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

44 lines
1.9 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">
2018-07-22 05:24:01 +00:00
<div class="section">
2018-07-01 08:09:29 +00:00
<div class="columns is-multiline">
{{ $numberOfPages := len .Pages}}
{{ range .Pages.ByWeight }}
2018-08-30 20:06:12 +00:00
{{ $width := "302x" }}
{{ $columWidth := "is-one-third" }}
2018-07-22 05:24:01 +00:00
{{ if .Site.Params.projects.useTwoColumns }}
2018-08-30 20:06:12 +00:00
{{ $columWidth = "is-half" }}
{{ $width = "490x" }}
{{ end}}
<div class="column {{ $columWidth }}">
2018-07-01 08:09:29 +00:00
<div class="card">
{{ if .Resources.ByType "image" }}
2018-07-01 08:09:29 +00:00
<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") }}
2018-07-22 05:24:01 +00:00
{{ $image := .Resize $width }}
2018-07-06 12:27:34 +00:00
<img src="{{ $image.Permalink }}" alt ="{{ $image.Name }}">
{{ end }}
{{ end }}
</a>
2018-07-01 08:09:29 +00:00
</figure>
</div>
{{ end }}
2018-07-01 08:09:29 +00:00
<div class="card-content has-text-centered top-pad">
<h1><a href="{{ if .Params.external_link }}{{ .Params.external_link }}{{ else }}{{ .Permalink }}{{ end }}">
2020-05-31 18:12:41 +00:00
{{ .Title | markdownify }}
</a></h1>
</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 }}