mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-09 14:59:45 +00:00
Order projects only by weigth
This commit is contained in:
parent
db98ff7573
commit
6b4e70a172
2 changed files with 3 additions and 3 deletions
|
@ -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">
|
||||
|
|
|
@ -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 }}
|
||||
|
|
Loading…
Reference in a new issue