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 }}
{{ if lt $numberOfProjectsToShow $totalProjects }}
@@ -43,8 +41,8 @@
- {{ range .Pages | first $numberOfProjectsToShow }} {{ if not .Params.external_link }}
-
+ {{ range $index, $element := .Pages | first $numberOfProjectsToShow }} {{ if not .Params.external_link }}
+
{{ with .Title }}
@@ -61,14 +59,14 @@
{{ end }}
-
+
{{ end }} {{ end }}