Use img.html directly if no caption
This commit is contained in:
@@ -24,22 +24,39 @@
|
||||
{{ $link = $resource.RelPermalink }}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "paige/image-figure.html" (dict
|
||||
"caption" $caption
|
||||
"compact" true
|
||||
"height" $height
|
||||
"link" $link
|
||||
"maxheight" $maxheight
|
||||
"maxwidth" $maxwidth
|
||||
"method" $method
|
||||
"options" $options
|
||||
"page" .Page
|
||||
"raw" $raw
|
||||
"resource" $resource
|
||||
"src" $image
|
||||
"table" true
|
||||
"width" $width
|
||||
) }}
|
||||
{{ if $caption }}
|
||||
{{ partial "paige/image-figure.html" (dict
|
||||
"caption" $caption
|
||||
"compact" true
|
||||
"height" $height
|
||||
"link" $link
|
||||
"maxheight" $maxheight
|
||||
"maxwidth" $maxwidth
|
||||
"method" $method
|
||||
"options" $options
|
||||
"page" .Page
|
||||
"raw" $raw
|
||||
"resource" $resource
|
||||
"src" $image
|
||||
"table" true
|
||||
"width" $width
|
||||
) }}
|
||||
{{ else }}
|
||||
{{ partial "paige/a.html" (dict
|
||||
"content" (partial "paige/img.html" (dict
|
||||
"class" "img-fluid"
|
||||
"height" $height
|
||||
"maxheight" $maxheight
|
||||
"maxwidth" $maxwidth
|
||||
"method" $method
|
||||
"options" $options
|
||||
"resource" $resource
|
||||
"src" $image
|
||||
"width" $width
|
||||
))
|
||||
"href" $link
|
||||
) }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ $inner := chomp .Inner }}
|
||||
|
||||
|
Reference in New Issue
Block a user