diff --git a/layouts/partials/bootstrap/img-grid.html b/layouts/partials/bootstrap/img-grid.html new file mode 100644 index 0000000..872d138 --- /dev/null +++ b/layouts/partials/bootstrap/img-grid.html @@ -0,0 +1,28 @@ +{{- $key := "" }} +{{- if .IsNamedParams }} + {{- $key = .Get "data" }} +{{- else }} + {{- $key = .Get 0 }} +{{- end }} +{{- $data := partialCached "bootstrap/functions/data" (dict "key" $key "page" .Page) .Page $key }} +{{- with $data }} +
+ {{- range . }} + {{- $img := partial "images/image" (dict + "Filename" .src + "ClassName" "bs-img-grid-item-img" + "Alt" .title + "Caption" .title) + }} + {{- if .url }} + + {{ $img }} + + {{- else }} +
+ {{ $img }} +
+ {{- end }} + {{- end }} +
+{{- end }} diff --git a/layouts/shortcodes/bootstrap/img-grid.html b/layouts/shortcodes/bootstrap/img-grid.html new file mode 100644 index 0000000..35aa87d --- /dev/null +++ b/layouts/shortcodes/bootstrap/img-grid.html @@ -0,0 +1 @@ +{{ partial "bootstrap/img-grid" . }} diff --git a/layouts/shortcodes/bs/img-grid.html b/layouts/shortcodes/bs/img-grid.html new file mode 100644 index 0000000..35aa87d --- /dev/null +++ b/layouts/shortcodes/bs/img-grid.html @@ -0,0 +1 @@ +{{ partial "bootstrap/img-grid" . }}