mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-12 16:29:44 +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">
|
<div class="columns is-multiline">
|
||||||
{{ $totalProjects := (len .Pages) }}
|
{{ $totalProjects := (len .Pages) }}
|
||||||
{{ $numberOfProjectsToShow := .Site.Params.numberOfProjectsToShow | default $totalProjects }}
|
{{ $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 }}
|
{{ if eq (mod $numberOfProjectsToShow 2) 0 }}
|
||||||
<div class="column is-half">
|
<div class="column is-half">
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- End Projects container -->
|
<!-- End Projects container -->
|
||||||
<!-- Projects modals -->
|
<!-- 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" id="modal-{{ $index }}">
|
||||||
<div class="modal-background"></div>
|
<div class="modal-background"></div>
|
||||||
<div class="modal-card">
|
<div class="modal-card">
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<div class="section is-small">
|
<div class="section is-small">
|
||||||
<div class="columns is-multiline">
|
<div class="columns is-multiline">
|
||||||
{{ $numberOfPages := len .Pages}}
|
{{ $numberOfPages := len .Pages}}
|
||||||
{{ range .Pages }}
|
{{ range .Pages.ByWeight }}
|
||||||
{{ if eq (mod $numberOfPages 2) 0 }}
|
{{ if eq (mod $numberOfPages 2) 0 }}
|
||||||
<div class="column is-half">
|
<div class="column is-half">
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
|
Loading…
Reference in a new issue