Compare commits

...

4 commits

2 changed files with 27 additions and 10 deletions

View file

@ -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: {
@ -111,6 +111,9 @@ jQuery(function ($) {
this.st.mainClass = this.st.el.attr('data-effect');
}
},
gallery:{
enabled:true
},
closeOnContentClick: true,
midClick: true,
fixedContentPos: false,

View file

@ -18,18 +18,32 @@
</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" }}
<div class="item item-center">
<img class="img-fluid AC-img" data-lazy="{{ $thumb.RelPermalink }}" alt="{{ .name }}" title="{{ .name }}">
</div>
{{ $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 }} */}}
{{ end }}
{{ end }}
</div>