neff-steindesign.de/themes/neff/layouts/shortcodes/gallery.html

52 lines
1.4 KiB
HTML

{{- $search := "**.jpg" -}}
{{- $keep := false -}}
{{- $title := true -}}
{{- $description := true -}}
{{- $lightbox := true -}}
{{- if .IsNamedParams -}}
{{- with .Get "search" -}}
{{ $search = . }}
{{- end -}}
{{- with .Get "original" -}}
{{- $keep = . }}
{{- end -}}
{{- with .Get "title" -}}
{{ $title = . }}
{{- end -}}
{{- $description := true -}}
{{ with .Get "description" -}}
{{- end -}}
{{- with .Get "lightbox" -}}
{{ $lightbox = . }}
{{- end -}}
{{- else -}}
{{- with .Get 0 -}}
{{ $search = . }}
{{- end -}}
{{- with .Get 1 -}}
{{ $title = . }}
{{- end -}}
{{- with .Get 2 -}}
{{ $description = . }}
{{- end -}}
{{- with .Get 3 -}}
{{ $keep = . }}
{{- end -}}
{{- with .Get 4 -}}
{{ $lightbox = . }}
{{- end -}}
{{- end -}}
<ul class="clearfix list-unstyled flex row gallery">
{{ if .Inner }}
{{ .Inner }}
{{ else }}
{{ range $.Page.Resources.Match $search }}
{{- if (ne .Params.featured true) -}}
<li class="padding">
{{- partial "figure.html" (dict "image" . "ctx" . "lightbox" $lightbox "class" "gallery" "showTitle" $title "showDescription" $description "keepOriginal" $keep) -}}
</li>
{{- end -}}
{{- end -}}
{{- end -}}
</ul>