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 ++------
 exampleSite/go.mod                             |    4 +++-
 exampleSite/content/docs/compose/shortcodes.md |    4 +---
 exampleSite/go.sum                             |    2 ++
 4 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/exampleSite/content/docs/compose/shortcodes.md b/exampleSite/content/docs/compose/shortcodes.md
index 124dc56..dddc572 100644
--- a/exampleSite/content/docs/compose/shortcodes.md
+++ b/exampleSite/content/docs/compose/shortcodes.md
@@ -98,7 +98,7 @@
 
 {{< liteyoutube videoid="MmG2ah5Df4g" params="controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1" >}}
 
-##### With All Three Parameters
+##### With All Three Positional Parameters
 
 ```markdown
 {{</* liteyoutube "MmG2ah5Df4g" "painting.jpg" "controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1" */>}}
@@ -106,8 +106,6 @@
 
 {{< liteyoutube "MmG2ah5Df4g" "painting.jpg" "controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1" >}}
 
-{{< liteyoutube videoid="MmG2ah5Df4g" img="painting.jpg" params="controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1" >}}
-
 {{< tip >}}
 You can browse the full list of YouTube parameters [here](https://developers.google.com/youtube/player_parameters#Parameters)
 {{< /tip >}}
diff --git a/exampleSite/go.mod b/exampleSite/go.mod
index 04d1339..2ec6d17 100644
--- a/exampleSite/go.mod
+++ b/exampleSite/go.mod
@@ -2,4 +2,6 @@
 
 go 1.15
 
-require github.com/rwstorer/hugo-theme-compose v0.0.0-20230611041900-16c2ce96ef5a // indirect
+require (
+
+)
diff --git a/exampleSite/go.sum b/exampleSite/go.sum
index f434943..71e457b 100644
--- a/exampleSite/go.sum
+++ b/exampleSite/go.sum
@@ -58,3 +58,5 @@
 github.com/rwstorer/hugo-theme-compose v0.0.0-20230611040011-726a11f5e7b8/go.mod h1:7TS3BoBV/IcLPRT2r7LyTyOqzsS5P5sXKlNpGgxdK/s=
 github.com/rwstorer/hugo-theme-compose v0.0.0-20230611041900-16c2ce96ef5a h1:O5zmkIshvR3RKLwxxDhFOXz1RGvsF23KAv9MrCxBrPc=
 github.com/rwstorer/hugo-theme-compose v0.0.0-20230611041900-16c2ce96ef5a/go.mod h1:7TS3BoBV/IcLPRT2r7LyTyOqzsS5P5sXKlNpGgxdK/s=
+github.com/rwstorer/hugo-theme-compose v0.0.0-20230611042716-1ae2e3d6a2af h1:XV6rJpiYMEox+r63cdP9ShXR9E2jshhiij1Ftu7I6VI=
+github.com/rwstorer/hugo-theme-compose v0.0.0-20230611042716-1ae2e3d6a2af/go.mod h1:7TS3BoBV/IcLPRT2r7LyTyOqzsS5P5sXKlNpGgxdK/s=
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