You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.0 KiB
HTML

{{ $alt := .Get "alt" }}
{{ $breakpoints := .Get "breakpoints" }}
{{ $densities := .Get "densities" }}
{{ $height := .Get "height" }}
{{ $link := .Get "link" }}
{{ $maxheight := .Get "maxheight" }}
{{ $maxwidth := .Get "maxwidth" }}
{{ $process := .Get "process" }}
{{ $sizes := .Get "sizes" }}
{{ $src := .Get 0 | default (.Get "src") }}
{{ $srcset := .Get "srcset" }}
{{ $title := .Get "title" }}
{{ $width := .Get "width" }}
{{ if not $src }}
{{ errorf "paige/image: no content" }}
{{ end }}
{{ $content := partial "paige/img.html" (dict
"alt" $alt
"breakpoints" $breakpoints
"class" "img-fluid"
"densities" $densities
"height" $height
"maxheight" $maxheight
"maxwidth" $maxwidth
"process" $process
"page" .Page
"sizes" $sizes
"src" $src
"srcset" $srcset
"title" $title
"width" $width
) }}
{{ if $link }}
{{ $content = partial "paige/a.html" (dict
"content" $content
"href" $link
) }}
{{ end }}
<div class="paige-image">{{ $content }}</div>