From 0e37d8ea2e7fc68859be9ce5b1dabaaca65309fa Mon Sep 17 00:00:00 2001
From: Ray <rwstorer@hotmail.com>
Date: Sun, 11 Jun 2023 01:47:15 +0000
Subject: [PATCH] added bkImg var
---
layouts/shortcodes/liteyoutube.html | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/layouts/shortcodes/liteyoutube.html b/layouts/shortcodes/liteyoutube.html
index 8330068..460d627 100644
--- a/layouts/shortcodes/liteyoutube.html
+++ b/layouts/shortcodes/liteyoutube.html
@@ -1,4 +1,7 @@
{{ $videoid := .Get "videoid" }}
{{ $params := .Get "params" }} <!-- not required. List of params here: https://developers.google.com/youtube/player_parameters -->
{{ $img := .Get "img"}} <!-- not required. The initial background image instead of a generated one. -->
-<lite-youtube videoid="{{$videoid}}"{{ if $img }} style="background-image: url('{{absURL (printf `images/%s` $img)}}`)"{{ end }}{{ if $params }} params="{{$params}}"{{ end }}></lite-youtube>
\ No newline at end of file
+{{ if $img }}
+ {{ $bkImg := absURL (printf "images/%s" $img) }}
+{{ end }}
+<lite-youtube videoid="{{$videoid}}"{{ if $img }} style="background-image: url('{{$bkImg}}')"{{ end }}{{ if $params }} params="{{$params}}"{{ end }}></lite-youtube>
\ No newline at end of file
--
Gitblit v1.10.0