Optimisation des images
This commit is contained in:
@@ -13,10 +13,6 @@
|
||||
{{- if not $image -}}
|
||||
{{- return -}}
|
||||
{{- end -}}
|
||||
{{- $display := $image -}}
|
||||
{{- if and (ne $display.MediaType.SubType "svg") (gt $display.Height 810) -}}
|
||||
{{- $display = $image.Resize "x810" -}}
|
||||
{{- end -}}
|
||||
{{- $metaTitle := index $data "title" -}}
|
||||
{{- $hasMeta := or $metaTitle (or $description (or $data.attribution $data.prompt)) -}}
|
||||
{{- $attributes := .Attributes | default dict -}}
|
||||
@@ -56,7 +52,13 @@
|
||||
{{- end -}}
|
||||
<figure class="{{ delimit $figureClasses " " }}">
|
||||
<a href="{{ $image.RelPermalink }}" title="Cliquez pour agrandir l'image">
|
||||
<img src="{{ $display.RelPermalink }}" alt="{{ $alt }}" title="{{ $title }}">
|
||||
{{- partial "media/display-img.html" (dict
|
||||
"image" $image
|
||||
"showMeta" $showMeta
|
||||
"forceCentered" $forceCentered
|
||||
"alt" $alt
|
||||
"title" $title
|
||||
) -}}
|
||||
</a>
|
||||
{{- if $showMeta -}}
|
||||
<figcaption class="figure-media-meta cover-meta">
|
||||
|
||||
Reference in New Issue
Block a user