diff --git a/layouts/index.html b/layouts/index.html index 4d0445c..077bbc1 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -84,7 +84,7 @@ {{ .Site.Params.photos.last | safeHTML }} - + {{ partial "photos.html" (dict "limit" 4) }}
- Index {{ end }} diff --git a/layouts/partials/photos.html b/layouts/partials/photos.html new file mode 100644 index 0000000..c1b054e --- /dev/null +++ b/layouts/partials/photos.html @@ -0,0 +1,34 @@ +{{ $photos := (resources.Match "posts/*")}} {{/*resources.ByType "image" */}} +
+ {{ if (or (eq $photos nil) (eq (len $photos) 0))}} +
+
+ + {{ .Site.Params.photos.empty }} +
+
+ {{ else }} +
+ {{ end }} + + + +