23 lines
584 B
HTML
Executable File
23 lines
584 B
HTML
Executable File
{{- $ctx := . -}}
|
|
{{- $page := (index .Pages 0) -}}
|
|
{{- $image := "" -}}
|
|
{{- $images := slice -}}
|
|
{{- with $page -}}
|
|
{{- $images = $page.Resources.ByType "image" }}
|
|
{{- else -}}
|
|
{{- $images = .Resources.ByType "image" -}}
|
|
{{- end -}}
|
|
{{- range $images -}}
|
|
{{ if .Params.featured }}
|
|
{{ $image = . }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ if $image }}
|
|
{{ else }}
|
|
{{ $image = index $images 0 }}
|
|
{{ end }}
|
|
{{ with $images }}
|
|
<li class="padding"> {{- partial "figure.html" (dict "ctx" $ctx "image" $image "class" "gallery" "showTitle" true "showDescription" true) -}}
|
|
</li>
|
|
{{ end }}
|