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.

45 lines
1.0 KiB
HTML

{{ $alt := .alt }}
{{ $caption := .caption }}
{{ $height := .height }}
{{ $link := .link }}
{{ $method := .method }}
{{ $options := .options }}
{{ $page := .page }}
{{ $resource := .resource }}
{{ $src := .src }}
{{ $table := .table }}
{{ $title := .title }}
{{ $width := .width }}
{{ $class := "img-fluid" }}
{{ if $caption }}
{{ $class = "figure-img img-fluid" }}
{{ end }}
{{ $content := partial "paige/img.html" (dict
"alt" $alt
"class" $class
"height" $height
"method" $method
"options" $options
"page" $page
"resource" $resource
"src" $src
"title" $title
"width" $width
) }}
{{ if $link }}
{{ $content = partial "paige/a.html" (dict
"content" $content
"href" $link
) }}
{{ end }}
<figure class="{{ if $table }} d-table mb-0 {{ end }} paige-figure text-center">
{{ $content }}
{{ with $caption }}
<figcaption class="figure-caption" {{ if $table }} style="caption-side: bottom; display: table-caption" {{ end }}>{{ . }}</figcaption>
{{ end }}
</figure>