Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanzei <hanzei@mailbox.org>2018-06-27 03:33:38 +0300
committerHanzei <hanzei@mailbox.org>2018-06-27 03:33:38 +0300
commitada193209735746bfe19b8d842a8776bbfa3de44 (patch)
tree77b3aefdebb052bf925068f1000cb67b7539b62a /layouts/partials/projects.html
parent389a69a6e71228b536af28776156fda30d22e217 (diff)
Code cleanup
Diffstat (limited to 'layouts/partials/projects.html')
-rw-r--r--layouts/partials/projects.html9
1 files changed, 3 insertions, 6 deletions
diff --git a/layouts/partials/projects.html b/layouts/partials/projects.html
index 63c42e9..f842cb8 100644
--- a/layouts/partials/projects.html
+++ b/layouts/partials/projects.html
@@ -5,12 +5,11 @@
<h2 class="title is-2 has-text-centered">
{{ .Title }}
</h2>
-
<div class="section is-small">
<div class="columns is-multiline">
- {{ $totalProjects := (len (.Site.GetPage "section" "projects").Pages) }}
+ {{ $totalProjects := (len .Pages) }}
{{ $numberOfProjectsToShow := .Site.Params.numberOfProjectsToShow | default $totalProjects }}
- {{ range (.Site.GetPage "section" "projects").Pages | first $numberOfProjectsToShow }}
+ {{ range .Pages | first $numberOfProjectsToShow }}
{{ if eq (mod $numberOfProjectsToShow 2) 0 }}
<div class="column is-half">
{{ else }}
@@ -43,9 +42,8 @@
{{ end }}
</div>
<!-- End Projects container -->
-
<!-- Projects modals -->
- {{ range (.Site.GetPage "section" "projects").Pages | first $numberOfProjectsToShow }} {{ if not .Params.external_link }}
+ {{ range .Pages | first $numberOfProjectsToShow }} {{ if not .Params.external_link }}
<div class="modal" id="modal{{ $card := .Title | urlize }}{{ replace $card "%" " "}}">
<div class="modal-background"></div>
<div class="modal-card">
@@ -77,6 +75,5 @@
{{ partial "top-icon.html" . }}
</div>
<!-- End Projects section -->
-
<div class="container"><hr></div>
{{ end }}