Compare commits

...

4 commits

2 changed files with 27 additions and 10 deletions

View file

@ -101,7 +101,7 @@ jQuery(function ($) {
/* ========================================================================= */ /* ========================================================================= */
/* Magnific popup /* Magnific popup
/* ========================================================================= */ /* ========================================================================= */
$('.image-popup').magnificPopup({ $('.image-popup-gallery').magnificPopup({
type: 'image', type: 'image',
removalDelay: 160, //delay removal by X to allow out-animation removalDelay: 160, //delay removal by X to allow out-animation
callbacks: { callbacks: {
@ -111,6 +111,9 @@ jQuery(function ($) {
this.st.mainClass = this.st.el.attr('data-effect'); this.st.mainClass = this.st.el.attr('data-effect');
} }
}, },
gallery:{
enabled:true
},
closeOnContentClick: true, closeOnContentClick: true,
midClick: true, midClick: true,
fixedContentPos: false, fixedContentPos: false,

View file

@ -18,18 +18,32 @@
</div> </div>
<div id="ArtCarousel" class="wow fadeInUp center-block" data-wow-duration="500ms" data-wow-delay="100ms"> <div id="ArtCarousel" class="wow fadeInUp center-block" data-wow-duration="500ms" data-wow-delay="100ms">
{{ $images := slice }} {{/* {{ $images := slice }}
{{ $image_thumb := slice }} {{ $image_thumb := slice }} */}}
{{ range .portfolio_categories }} {{ range .portfolio_categories }}
{{ range .portfolio_items }} {{ range .portfolio_items }}
{{ $images = $images | append .image }} {{ if eq .slideshow true }}
{{ $image_thumb := $image_thumb | append .image_thumb }} {{/* {{ $images = $images | append .image }} */}}
{{- $original := resources.Get .image -}}
{{ $thumb := $original.Resize "x320" }}
{{ $image := $original.Fit "1080x1080" }}
{{ 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 }} */}}
{{- $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 }}
{{ end }} {{ end }}
</div> </div>