From af34c8adb97a6e4f28a1b9652275e9e0b89fa5f6 Mon Sep 17 00:00:00 2001
From: Aroy-Art <Aroy-Art@pm.me>
Date: Tue, 14 Feb 2023 15:51:38 +0100
Subject: [PATCH 1/4] Add: Image popup & 3 try to fix art carousel

---
 layouts/partials/imageSlideShow.html | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/layouts/partials/imageSlideShow.html b/layouts/partials/imageSlideShow.html
index ff96f9f..50504e8 100644
--- a/layouts/partials/imageSlideShow.html
+++ b/layouts/partials/imageSlideShow.html
@@ -18,18 +18,23 @@
 
                 </div>
                 <div id="ArtCarousel" class="wow fadeInUp center-block" data-wow-duration="500ms" data-wow-delay="100ms">
-                    {{ $images := slice }}
-                    {{ $image_thumb := slice }}
+                    {{/*  {{ $images := slice }}
+                    {{ $image_thumb := slice }}  */}}
                     {{ range .portfolio_categories }}
                         {{ range .portfolio_items }}
-                            {{ $images = $images | append .image }}
-                            {{ $image_thumb := $image_thumb | append .image_thumb }}
+                            {{ if eq .slideshow true }}
+                                {{/*  {{ $images = $images | append .image }}    */}}
+                                
+                                {{- $original := resources.Get .image -}}
+                                {{ $thumb := $original.Resize "x320" }}
+                                {{ $image := $original.Fit "1080x1080" }}
+                                <a class="item item-center image-popup-gallery" data-mfp-src="{{ $image.RelPermalink }}">
+                                        <img class="img-fluid AC-img" data-lazy="{{ $thumb.RelPermalink }}" onerror='this.onerror=null,this.src="{{ $thumb.RelPermalink }}"' alt="{{ .name }}" title="{{ .name }}">
+                                </a>  
+                            {{ end }}
+                            
+                            {{/*  {{ $image_thumb := $image_thumb | append .image_thumb }}  */}}
 
-                        {{- $original := resources.Get .image -}}
-                        {{ $thumb := $original.Resize "x320" }}
-                        <div class="item item-center">
-                                <img class="img-fluid AC-img" data-lazy="{{ $thumb.RelPermalink }}" alt="{{ .name }}" title="{{ .name }}">
-                        </div>
                         {{ end }}
                     {{ end }}
                 </div>

From ae9667b31a3fd7ad2f7dc7486f645ee70010b570 Mon Sep 17 00:00:00 2001
From: Aroy-Art <Aroy-Art@pm.me>
Date: Tue, 14 Feb 2023 16:02:45 +0100
Subject: [PATCH 2/4] Change: image popup to gallery mode

---
 assets/js/script.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/assets/js/script.js b/assets/js/script.js
index f9fb09b..a509b5a 100644
--- a/assets/js/script.js
+++ b/assets/js/script.js
@@ -111,6 +111,9 @@ jQuery(function ($) {
 				this.st.mainClass = this.st.el.attr('data-effect');
 			}
 		},
+		gallery:{
+			enabled:true
+		},
 		closeOnContentClick: true,
 		midClick: true,
 		fixedContentPos: false,

From 3c4949c3b335b1c1622032894b5acb1a9f5d8fa4 Mon Sep 17 00:00:00 2001
From: Aroy-Art <Aroy-Art@pm.me>
Date: Tue, 14 Feb 2023 16:05:25 +0100
Subject: [PATCH 3/4] Change: image popup tag name

---
 assets/js/script.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/assets/js/script.js b/assets/js/script.js
index a509b5a..aeafa5b 100644
--- a/assets/js/script.js
+++ b/assets/js/script.js
@@ -101,7 +101,7 @@ jQuery(function ($) {
 	/* ========================================================================= */
 	/*	Magnific popup
 	/* =========================================================================  */
-	$('.image-popup').magnificPopup({
+	$('.image-popup-gallery').magnificPopup({
 		type: 'image',
 		removalDelay: 160, //delay removal by X to allow out-animation
 		callbacks: {

From 980825f55e92c1e27d4894ba252c90a14f75e355 Mon Sep 17 00:00:00 2001
From: Aroy-Art <Aroy-Art@pm.me>
Date: Tue, 14 Feb 2023 16:20:18 +0100
Subject: [PATCH 4/4] Fix: 4 try to fix art carousel

---
 layouts/partials/imageSlideShow.html | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/layouts/partials/imageSlideShow.html b/layouts/partials/imageSlideShow.html
index 50504e8..f85b055 100644
--- a/layouts/partials/imageSlideShow.html
+++ b/layouts/partials/imageSlideShow.html
@@ -28,9 +28,18 @@
                                 {{- $original := resources.Get .image -}}
                                 {{ $thumb := $original.Resize "x320" }}
                                 {{ $image := $original.Fit "1080x1080" }}
-                                <a class="item item-center image-popup-gallery" data-mfp-src="{{ $image.RelPermalink }}">
-                                        <img class="img-fluid AC-img" data-lazy="{{ $thumb.RelPermalink }}" onerror='this.onerror=null,this.src="{{ $thumb.RelPermalink }}"' alt="{{ .name }}" title="{{ .name }}">
-                                </a>  
+                                
+                                {{ if eq site.Params.onNetlify true }}
+                                    <a class="item item-center image-popup-gallery" data-mfp-src="{{ $image.RelPermalink }}">
+                                        <img class="img-fluid AC-img" src="{{ $thumb.RelPermalink }}" onerror='this.onerror=null,this.src="{{ $thumb.RelPermalink }}"' alt="{{ .name }}" title="{{ .name }}">
+                                    </a>
+
+                                {{ else }}
+                                    <a class="item item-center image-popup-gallery" data-mfp-src="{{ $image.RelPermalink }}">
+                                            <img class="img-fluid AC-img" data-lazy="{{ $thumb.RelPermalink }}" onerror='this.onerror=null,this.src="{{ $thumb.RelPermalink }}"' alt="{{ .name }}" title="{{ .name }}">
+                                    </a>
+
+                                {{ end }}
                             {{ end }}
                             
                             {{/*  {{ $image_thumb := $image_thumb | append .image_thumb }}  */}}