More fixes
This commit is contained in:
@@ -18,30 +18,30 @@
|
||||
<section class="section-description">{{ .Content }}</section>
|
||||
</div>
|
||||
|
||||
{{- $image := partialCached "helper/image" (dict "Context" . "Type" "section") .RelPermalink "section" -}}
|
||||
{{ if $image.exists }}
|
||||
<div class="section-image">
|
||||
{{ if $image.resource }}
|
||||
{{- $Permalink := $image.resource.RelPermalink -}}
|
||||
{{- $Width := $image.resource.Width -}}
|
||||
{{- $Height := $image.resource.Height -}}
|
||||
|
||||
{{- if (default true .Page.Site.Params.imageProcessing.cover.enabled) -}}
|
||||
{{- $thumbnail := $image.resource.Fill "120x120" -}}
|
||||
{{- $Permalink = $thumbnail.RelPermalink -}}
|
||||
{{- $Width = $thumbnail.Width -}}
|
||||
{{- $Height = $thumbnail.Height -}}
|
||||
{{- end -}}
|
||||
|
||||
<img src="{{ $Permalink }}"
|
||||
width="{{ $Width }}"
|
||||
height="{{ $Height }}"
|
||||
loading="lazy">
|
||||
{{ else }}
|
||||
<img src="{{ $image.permalink }}" loading="lazy" />
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<!-- {{- $image := partialCached "helper/image" (dict "Context" . "Type" "section") .RelPermalink "section" -}}-->
|
||||
<!-- {{ if $image.exists }}-->
|
||||
<!-- <div class="section-image">-->
|
||||
<!-- {{ if $image.resource }}-->
|
||||
<!-- {{- $Permalink := $image.resource.RelPermalink -}}-->
|
||||
<!-- {{- $Width := $image.resource.Width -}}-->
|
||||
<!-- {{- $Height := $image.resource.Height -}}-->
|
||||
<!-- -->
|
||||
<!-- {{- if (default true .Page.Site.Params.imageProcessing.cover.enabled) -}}-->
|
||||
<!-- {{- $thumbnail := $image.resource.Fill "120x120" -}}-->
|
||||
<!-- {{- $Permalink = $thumbnail.RelPermalink -}}-->
|
||||
<!-- {{- $Width = $thumbnail.Width -}}-->
|
||||
<!-- {{- $Height = $thumbnail.Height -}}-->
|
||||
<!-- {{- end -}}-->
|
||||
<!-- -->
|
||||
<!-- <img src="{{ $Permalink }}" -->
|
||||
<!-- width="{{ $Width }}"-->
|
||||
<!-- height="{{ $Height }}" -->
|
||||
<!-- loading="lazy">-->
|
||||
<!-- {{ else }}-->
|
||||
<!-- <img src="{{ $image.permalink }}" loading="lazy" />-->
|
||||
<!-- {{ end }}-->
|
||||
<!-- </div>-->
|
||||
<!-- {{ end }}-->
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user