mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2025-07-12 02:21:00 -04:00
Add comments and manage whitespace
This commit is contained in:
parent
51def434ed
commit
3408ee9d59
@ -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 }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user