uci-hugo-landingpage/layouts/shortcodes/image.html

17 lines
532 B
HTML
Raw Normal View History

{{ $path := "/images/" }}
{{ $filename := .Get "filename" }}
{{ with $.Site.Params.imagespath }} {{ $path := ( . ) }}{{ end }}
<div class="box box--column box--image">
{{ with .Get "title" }}
<div class="box__title">{{ . }}</div>
{{ end }}
{{ with .Get "link"}}
{{ if eq . "modal" }}<a href="{{ $path }}{{ $filename }}">{{ else }}<a href="{{.}}">{{ end }}
{{ end }}
<img src="{{ $path }}{{ .Get "filename" }}" />
2017-02-28 09:56:46 -08:00
{{ if .Get "link"}}</a>{{ end }}
{{ with .Get "caption"}}
<div class="box__caption">{{ . }}</div>
2017-02-28 09:56:46 -08:00
{{ end }}
</div>