Add comments and manage whitespace

This commit is contained in:
Aditya Telange 2024-11-09 21:05:08 +05:30
parent 51def434ed
commit 3408ee9d59
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77

View File

@ -10,8 +10,8 @@
{{- $pageBundleCover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} {{- $pageBundleCover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
{{- $globalResourcesCover := (resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} {{- $globalResourcesCover := (resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
{{- $cover := (or $pageBundleCover $globalResourcesCover)}} {{- $cover := (or $pageBundleCover $globalResourcesCover)}}
{{/* We are not using the .Param.cover.relative to decide the location of image */}} {{- /* We are not using the .Param.cover.relative to decide the location of image */}}
{{/* If we have the image in pageBundle or globalResources we can process the image */}} {{- /* If we have the image in pageBundle or globalResources we can process the image */}}
{{- $sizes := (slice "360" "480" "720" "1080" "1500") }} {{- $sizes := (slice "360" "480" "720" "1080" "1500") }}
{{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}} {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}}
@ -46,17 +46,17 @@
<img loading="{{ $loading }}" src="{{ $imgdl }}" alt="{{ $alt }}"> <img loading="{{ $loading }}" src="{{ $imgdl }}" alt="{{ $alt }}">
{{- end }} {{- end }}
{{- else }} {{- else }}
{{/* For absolute urls and external links, no img processing here */}} {{- /* For absolute urls and external links, no img processing here */}}
<img loading="{{ $loading }}" src="{{ $imgdl }}" alt="{{ $alt }}"> <img loading="{{ $loading }}" src="{{ $imgdl }}" alt="{{ $alt }}">
{{- end }} {{- end }}
{{- if $addLink }} {{- if $addLink }}
</a> </a>
{{ end -}} {{- end -}}
{{/* Display Caption */}} {{- /* Display Caption */}}
{{- if $.IsSingle }} {{- if $.IsSingle }}
{{- with .Params.cover.caption }} {{ with .Params.cover.caption -}}
<figcaption>{{ . | markdownify }}</figcaption> <figcaption>{{ . | markdownify }}</figcaption>
{{- end }} {{- end }}
{{- end }} {{- end }}