23 lines
789 B
HTML
23 lines
789 B
HTML
{{ $path := "/images/" }}
|
|
{{ $filename := .Get "filename" }}
|
|
{{ with $.Site.Params.imagespath }} {{ $path := ( . ) }}{{ end }}
|
|
<div class="box box--column box--image
|
|
{{ with .Get "style"}} box--image-{{ . }}{{ end }}
|
|
{{ with .Get "link"}}{{ if eq . "lightbox" }} box--image-lightbox{{ end }}{{ end }}
|
|
"
|
|
{{ with .Get "maxwidth"}} maxWidth="{{ . }}"{{ end }}
|
|
{{ with .Get "wpad"}} wPad="{{ . }}"{{ end }}
|
|
>
|
|
{{ with .Get "title" }}
|
|
<div class="box__title">{{ . }}</div>
|
|
{{ end }}
|
|
{{ with .Get "link"}}
|
|
{{ if eq . "lightbox" }}<a href="{{ $path }}{{ $filename }}">{{ else }}<a href="{{.}}" target="_blank" >{{ end }}
|
|
{{ end }}
|
|
<img src="{{ $path }}{{ .Get "filename" }}" />
|
|
{{ if .Get "link"}}</a>{{ end }}
|
|
{{ with .Get "caption"}}
|
|
<div class="box__caption">{{ . }}</div>
|
|
{{ end }}
|
|
</div>
|