diff options
author | tdro <tdro@noreply.example.com> | 2022-06-13 00:01:47 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-06-13 00:09:21 -0400 |
commit | 74a25c1420a7d97eaeb085d69f46853e2c39bd51 (patch) | |
tree | c4999eb14f49d4590340f40b36fa8a4f67d8a88c /themes/default/layouts/partials/gallery-walk.html | |
parent | a409171b4fff7906c7a7780e1c50c0d40269dfe5 (diff) | |
download | canory-74a25c1420a7d97eaeb085d69f46853e2c39bd51.tar.gz canory-74a25c1420a7d97eaeb085d69f46853e2c39bd51.tar.bz2 canory-74a25c1420a7d97eaeb085d69f46853e2c39bd51.zip |
themes/default/layouts/partials/gallery-walk: Ignore select files and folders
Diffstat (limited to 'themes/default/layouts/partials/gallery-walk.html')
-rw-r--r-- | themes/default/layouts/partials/gallery-walk.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/themes/default/layouts/partials/gallery-walk.html b/themes/default/layouts/partials/gallery-walk.html index 8694df5..f88d31a 100644 --- a/themes/default/layouts/partials/gallery-walk.html +++ b/themes/default/layouts/partials/gallery-walk.html @@ -4,9 +4,10 @@ {{- if fileExists $folder }} {{- $files := readDir $folder }} {{- if $files }} - {{- range first 6 $files }} + {{- range first 5 (where $files "Name" "not in" (slice "page" "rss.xml" "index.html")) }} {{- if not .IsDir }} + {{- $name := index (split .Name ".") 0 }} {{- $extension := path.Ext .Name }} {{- $path := path.Join $folder .Name }} @@ -24,7 +25,6 @@ (eq $extension ".svg") (eq $extension ".webp") }} - {{- with $image := resources.Get $path -}} {{- $imageContent := (.Content | resources.FromString (print "/data/static/images/" ($image | urlize))).Fit $dimensions }} <img @@ -35,8 +35,8 @@ src="{{ $imageContent.RelPermalink }}" /> {{ end }} - {{- end }} + {{- end }} {{- if .IsDir }} @@ -44,5 +44,5 @@ {{- end }} {{- end }} - {{- end }} + {{- end }} {{- end }} |