From fa22efc00a50fbd9758ec39e31cef1d7f8884b89 Mon Sep 17 00:00:00 2001
From: Ray <rwstorer@hotmail.com>
Date: Sun, 11 Jun 2023 04:38:51 +0000
Subject: [PATCH] scoping strikes again
---
layouts/shortcodes/liteyoutube.html | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/layouts/shortcodes/liteyoutube.html b/layouts/shortcodes/liteyoutube.html
index a9a4723..c9e5799 100644
--- a/layouts/shortcodes/liteyoutube.html
+++ b/layouts/shortcodes/liteyoutube.html
@@ -4,9 +4,7 @@
{{ $bkImg := "" }}
{{ $params := .Get "params" }} <!-- not required. List of params here: https://developers.google.com/youtube/player_parameters -->
{{ with $img }}
- {{ $bkImg := absURL (printf "images/%s" $img) }}
- {{ printf "named img = [%s]" $img }}
- {{ printf "named bkImg = [%s]" $bkImg}}
+ {{ $bkImg := absURL (printf "images/%s" .) }}
<lite-youtube videoid="{{$videoid}}"{{ with $bkImg }} style="background-image: url('{{ . }}')"{{ end }}{{ with $params }} params="{{ . }}"{{ end }}></lite-youtube>
{{ else }}
<lite-youtube videoid="{{$videoid}}"{{ with $params }} params="{{ . }}"{{ end }}></lite-youtube>
@@ -17,9 +15,7 @@
{{- $params := .Get 2 -}} <!-- not required. List of params here: https://developers.google.com/youtube/player_parameters -->
{{ $bkImg := "" }}
{{ with $img }}
- {{ $bkImg := absURL (printf "images/%s" $img) }}
- {{ printf "pos img = [%s]" $img }}
- {{ printf "pos bkImg = [%s]" $bkImg}}
+ {{ $bkImg := absURL (printf "images/%s" .) }}
<lite-youtube videoid="{{$videoid}}"{{ with $bkImg }} style="background-image: url('{{ . }}')"{{ end }}{{ with $params }} params="{{ . }}"{{ end }}></lite-youtube>
{{ else }}
<lite-youtube videoid="{{$videoid}}"{{ with $params }} params="{{ . }}"{{ end }}></lite-youtube>
--
Gitblit v1.10.0