diff options
Diffstat (limited to 'layouts/projects/list.html')
-rw-r--r-- | layouts/projects/list.html | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/layouts/projects/list.html b/layouts/projects/list.html index a4f6e1a..37480ea 100644 --- a/layouts/projects/list.html +++ b/layouts/projects/list.html @@ -7,18 +7,17 @@ <div class="columns is-multiline"> {{ $numberOfPages := len .Pages}} {{ range .Pages.ByWeight }} + {{ $width := "302x" }} + {{ $columWidth := "is-one-third" }} {{ if .Site.Params.projects.useTwoColumns }} - {{ .Scratch.Set "width" "490x" }} - <div class="column is-half"> - {{ else }} - {{ .Scratch.Set "width" "302x" }} - <div class="column is-one-third"> - {{ end }} + {{ $columWidth = "is-half" }} + {{ $width = "490x" }} + {{ end}} + <div class="column {{ $columWidth }}"> <div class="card"> <div class="card-image"> <figure class="image is-3by2"> <a href="{{ if .Params.external_link }}{{ .Params.external_link }}{{ else }}{{ .Permalink }}{{ end }}"> - {{ $width := ( .Scratch.Get "width" ) }} {{ with .Resources.ByType "image" }} {{ range first 1 (sort . "Params.weight") }} {{ $image := .Resize $width }} |