From a00f01147c0b1f6c43983a7f4bd7b610cabb8c8b Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sat, 9 Nov 2024 20:25:03 +0530
Subject: [PATCH] Refactor 2
---
layouts/partials/cover.html | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/layouts/partials/cover.html b/layouts/partials/cover.html
index 5f341a90..4289c18f 100644
--- a/layouts/partials/cover.html
+++ b/layouts/partials/cover.html
@@ -8,9 +8,12 @@
{{- $pageBundleCover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
{{- $globalResourcesCover := (resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
{{- $cover := (or $pageBundleCover $globalResourcesCover)}}
+
+ {{- if $addLink }}
+
+ {{- end }}
+
{{- if $cover -}}{{/* i.e it is present in page bundle */}}
- {{- if $addLink }}{{ end -}}
{{- $sizes := (slice "360" "480" "720" "1080" "1500") }}
{{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}}
{{- if hugo.IsExtended -}}
@@ -33,10 +36,16 @@
rel="noopener noreferrer">{{ end -}}
{{- end }}
- {{- if $addLink }}{{ end -}}
+
+ {{- if $addLink }}
+
+ {{ end -}}
+
{{/* Display Caption */}}
{{- if $.IsSingle }}
- {{ with .Params.cover.caption }}
{{ . | markdownify }}
{{- end }} + {{- with .Params.cover.caption }} +{{ . | markdownify }}
+ {{- end }} {{- end }} {{- end }}{{/* End image */}}