diff --git a/layouts/index.html b/layouts/index.html index a63d3f3..52e88ff 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -10,21 +10,27 @@
{{- partial "header.html" . -}}
+
+
+
+
+
+
{{ $sourcePath := "images" }} {{ $gallery := site.GetPage $sourcePath }} - {{ $images := $gallery.Resources.ByType "image" }} - {{ $index := len $images }} - - {{ range $images }} - {{ $index = sub $index 1}} -
- -
+ {{ with $gallery.Resources.ByType "image" }} + {{ $index := len . }} + {{ $.Scratch.Add "img" slice }} + {{ range . }} + {{ $index = sub $index 1}} + {{ $.Scratch.Add "img" (dict "link" .RelPermalink "height" .Height "width" .Width) }} +
+ +
+ {{ end }} + {{ end }} -