{{/* section label: Gallery about: A grid of pictures that open full size, with captions. fields: - { name: heading, type: text } - { name: intro, type: markdown } - { name: columns, type: select, options: ["2", "3", "4"], default: "3", label: Pictures per row } - name: items type: list label: Pictures fields: - { name: image, type: image, required: true } - { name: alt, type: text, label: What the picture shows, required: true } - { name: caption, type: text } - { name: from, type: data, label: Pictures from, help: A file in data/ that holds the pictures. Leave empty to use the pictures above. } */}} {{ $items := .Data.items }}{{ with .Data.from }}{{ $items = data . }}{{ end }} {{ $g := printf "gallery-%d" .Index }}{{ $n := len $items }}