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

github.com/2-REC/hugo-myportfolio-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/sections/projects.html')
-rw-r--r--layouts/partials/sections/projects.html15
1 files changed, 13 insertions, 2 deletions
diff --git a/layouts/partials/sections/projects.html b/layouts/partials/sections/projects.html
index e619fd9..d3c410d 100644
--- a/layouts/partials/sections/projects.html
+++ b/layouts/partials/sections/projects.html
@@ -11,11 +11,22 @@
{{ if .Sections }}
{{/* Sort the list */}}
{{ partial "utils/ordered-list.html" (dict "list" .Sections "params" .Params "scratch" .Scratch) }}
- {{ range (.Scratch.Get "list") }}
- {{ partial "project-image.html" (dict "context" . "data" $params.home) }}
+ {{ $projects := .Scratch.Get "list" }}
+ {{ $max := len $projects }}
+ {{ if and $params.max_projects (lt $params.max_projects $max) }}
+ {{ $max = $params.max_projects }}
+ {{ end }}
+ {{ range seq $max }}
+ {{ $project := index $projects (sub . 1) }}
+ {{ partial "project-image.html" (dict "context" $project "data" $params.home "fit" $params.fit_rows "nb" $max "index" .) }}
{{ end }}
{{ .Scratch.Delete "list" }}
{{ end }}
</div>
+ <div class="row no-gutter" style="text-align: center;">
+ <a href="/{{ $path }}" >
+ More ...
+ </a>
+ </div>
</div>
</section>