From db4f7e5d7a12f953f795169fc340b920f784a572 Mon Sep 17 00:00:00 2001 From: Hanzei Date: Wed, 27 Jun 2018 11:22:46 +0200 Subject: [PATCH] Simplify logic for project modals --- layouts/partials/projects.html | 46 ++++++++++++++++------------------ 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/layouts/partials/projects.html b/layouts/partials/projects.html index f842cb8..98ebc71 100644 --- a/layouts/partials/projects.html +++ b/layouts/partials/projects.html @@ -9,30 +9,28 @@
{{ $totalProjects := (len .Pages) }} {{ $numberOfProjectsToShow := .Site.Params.numberOfProjectsToShow | default $totalProjects }} - {{ range .Pages | first $numberOfProjectsToShow }} + {{ range $index, $element := .Pages | first $numberOfProjectsToShow }} {{ if eq (mod $numberOfProjectsToShow 2) 0 }}
- {{ else }} -
- {{ end }} -
-
-
- - - -
-
-
+ {{ else }} +
+ {{ end }} + +
- {{ end }}
+ {{ end }}
{{ if lt $numberOfProjectsToShow $totalProjects }} @@ -43,8 +41,8 @@
- {{ range .Pages | first $numberOfProjectsToShow }} {{ if not .Params.external_link }} -