Order projects only by weigth

This commit is contained in:
Hanzei 2018-06-27 11:37:23 +02:00
parent db98ff7573
commit 6b4e70a172
No known key found for this signature in database
GPG key ID: 69A2DEFD98937BA0
2 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,7 @@
<div class="columns is-multiline">
{{ $totalProjects := (len .Pages) }}
{{ $numberOfProjectsToShow := .Site.Params.numberOfProjectsToShow | default $totalProjects }}
{{ range $index, $element := .Pages | first $numberOfProjectsToShow }}
{{ range $index, $element := .Pages.ByWeight | first $numberOfProjectsToShow }}
{{ if eq (mod $numberOfProjectsToShow 2) 0 }}
<div class="column is-half">
{{ else }}
@ -41,7 +41,7 @@
</div>
<!-- End Projects container -->
<!-- Projects modals -->
{{ range $index, $element := .Pages | first $numberOfProjectsToShow }} {{ if not .Params.external_link }}
{{ range $index, $element := .Pages.ByWeight | first $numberOfProjectsToShow }} {{ if not .Params.external_link }}
<div class="modal" id="modal-{{ $index }}">
<div class="modal-background"></div>
<div class="modal-card">

View file

@ -17,7 +17,7 @@
<div class="section is-small">
<div class="columns is-multiline">
{{ $numberOfPages := len .Pages}}
{{ range .Pages }}
{{ range .Pages.ByWeight }}
{{ if eq (mod $numberOfPages 2) 0 }}
<div class="column is-half">
{{ else }}