forked from neff/neff-steindesign.de
55 lines
1.3 KiB
HTML
55 lines
1.3 KiB
HTML
{{ $search := "**.jpg" }}
|
|
{{ $class := "" }}
|
|
{{ $title := "" }}
|
|
{{ $alt := "" }}
|
|
{{ $description := "" }}
|
|
{{ $lightbox := true }}
|
|
{{ $showTitle := true }}
|
|
{{ $showDescription := true }}
|
|
{{ $list := false }}
|
|
{{ if .IsNamedParams }}
|
|
{{ with .Get "search" }}
|
|
{{ $search = .}}
|
|
{{ end }}
|
|
{{ with .Get "class" }}
|
|
{{ $class = .}}
|
|
{{ end }}
|
|
{{ with .Get "title" }}
|
|
{{ $title = .}}
|
|
{{ end }}
|
|
{{ with .Get "description" }}
|
|
{{ $description = .}}
|
|
{{ end }}
|
|
{{ with .Get "alt" }}
|
|
{{ $alt = .}}
|
|
{{ else }}
|
|
{{ $alt = $description}}
|
|
{{ end }}
|
|
{{ with .Get "lightbox" }}
|
|
{{ $lightbox = .}}
|
|
{{ end }}
|
|
{{ with .Get "showTitle" }}
|
|
{{ $showTitle = .}}
|
|
{{ end }}
|
|
{{ with .Get "showDescription" }}
|
|
{{ $showTitle = .}}
|
|
{{ end }}
|
|
{{ with .Get "list" }}
|
|
{{ $list = .}}
|
|
{{ end }}
|
|
{{ else }}
|
|
{{ with .Get 0 }}
|
|
{{ $search = . }}
|
|
{{ end }}
|
|
{{ with .Get 1 }}
|
|
{{ $class = . }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ $image := $.Page.Resources.GetMatch $search }}
|
|
{{ if $list }}
|
|
<li class="padding">
|
|
{{ end }}
|
|
{{ partial "figure.html" (dict "image" $image "ctx" $image "class" $class "lightbox" $lightbox "showTitle" $showTitle "showDescription" $showDescription) }}
|
|
{{ if $list }}
|
|
</li>
|
|
{{ end }} |