Carousel Gallery

 

 

 

 

The gallery carousel shortcode allows to add a slider of images inside the page. You can change the type of navigation, set the images and assign to each a proper caption and alt text. Clicking on an image a popup showing the full-width version will be shown. Please find more details after the examples.

 

EX 1:Β Gallery with thumbnails navigation

 

 

Scoped custom properties can be used for fine-tuning

            
                  /*STAGE*/
.gallery_wrap.gallery_carousel.main{
    /*Maximum width;*/
    --max-widht: 1100px;
    /*Proportion of the stage;  both float numbers and fractions are supported*/
    --aspect-ratio: 16 / 9;
   /*Arrows visibility: 1 is visible, 0 is invisible*/
    --arrows: 1;
}

/*THUMBNAILS*/
.gallery_wrap.gallery_carousel.pager{
    /*Number of the thumbnails*/
    --c: 4;
    /*Proportion of the stage;  both float numbers and fractions are supported*/
    --aspect-ratio: 16 / 9;
    /*Border width of the current slide*/
    --border: 4px;
    /*Margin between slides*/
    --margin: 0px;
   /*Arrows visibility; 1 is visible, 0 is invisible*/
    --arrows: 1;
}            
        

The custom properties can also be changed programmatically when an event occurs

 

dfdfedf
            
                  
//Vanilla
document.addEventListener('someEvent', function(e){

   const slider = document.querySelector('.main');
   const thumbs = document.querySelector('.pager');

   slider.style.setProperty('--arrows', '0', '');
   thumbs.style.setProperty('--arrows', '1', '');

});

//jQuery
(function ($) {
   $(window).on('someEvent', function(e){

      var slider = $('.main');
      var thumbs = $('.pager');

      slider.css({'--arrows' : '0'});
      thumbs.css({'--arrows' : '1'});

   });

})(jQuery);

            
        
            
                  πŸ—‚οΈ shortcodes
β”‚
β””β”€β”€β”€πŸ“_shared
β”‚   β”‚
β”‚   └─── πŸ“assets
β”‚       β”‚   
β”‚       └─── πŸ“js
β”‚       β”‚     file112.txt
β”‚       β”‚   
β”‚       └─── πŸ“css
β”‚       β”‚     file112.txt
β”‚        
β””β”€β”€β”€πŸ“gallery_carousel
     β”‚     file021.txt
     β”‚ 
     └─── πŸ“assets
         β”‚   
         └─── πŸ“js
         β”‚     file112.txt
         β”‚   
         └─── πŸ“css
         β”‚     file112.txt
      
               
        

 

 

            
                  </code><script>alert('hacked')</script>