Added modal/gallery on thumbnails of single items collections using lightbox.

This commit is contained in:
Fabiano Alencar 2018-12-21 17:22:04 -02:00
parent 077c07689b
commit e89454b291
4 changed files with 26 additions and 4 deletions

View File

@ -112,4 +112,9 @@ jQuery( document ).ready(function( $ ) {
}
return false;
});
$(document).on('click', '[data-toggle="lightbox"]', function(event) {
event.preventDefault();
$(this).ekkoLightbox();
});
});

View File

@ -609,3 +609,12 @@ nav{
@import "_footer";
@import "_view-mode-grid.scss";
.ekko-lightbox-nav-overlay {
a {
opacity: 1;
span {
padding: 0;
}
}
}

View File

@ -14,9 +14,9 @@ if ( ! function_exists( 'tainacan_enqueues' ) ) {
//Style
wp_register_style( 'tainacan_bootstrap4CSS', get_template_directory_uri() . '/assets/vendor/bootstrap/css/bootstrap.min.css' );
wp_enqueue_style( 'tainacan_bootstrap4CSS' );
//Popper
/* //Popper
wp_register_script( 'tainacan_popper_bootstrap4', get_template_directory_uri() . '/assets/vendor/bootstrap/js/popper.min.js', '', '', true );
wp_enqueue_script( 'tainacan_popper_bootstrap4' );
wp_enqueue_script( 'tainacan_popper_bootstrap4' ); */
//Javascript
wp_register_script( 'tainacan_bootstrap4JS', get_template_directory_uri() . '/assets/vendor/bootstrap/js/bootstrap.min.js', array( 'jquery' ), '', true );
wp_enqueue_script( 'tainacan_bootstrap4JS' );
@ -33,6 +33,14 @@ if ( ! function_exists( 'tainacan_enqueues' ) ) {
wp_register_script( 'tainacan_SlickJS', get_template_directory_uri() . '/assets/vendor/slick/js/slick.min.js', array( 'jquery' ), '1.6.1', true );
wp_enqueue_script( 'tainacan_SlickJS' );
/**
* Ekko Lightbox
*/
wp_register_style( 'tainacan_EkkoLightboxCss', get_template_directory_uri() . '/assets/vendor/ekko-lightbox/ekko-lightbox.min.css');
wp_enqueue_style( 'tainacan_EkkoLightboxCss' );
wp_register_script( 'tainacan_EkkoLightboxJs', get_template_directory_uri() . '/assets/vendor/ekko-lightbox/ekko-lightbox.min.js', array('jquery'), null, true);
wp_enqueue_script( 'tainacan_EkkoLightboxJs' );
/**
* Google
*/

View File

@ -77,7 +77,7 @@
<div class="single-item-collection--attachments">
<?php foreach ( $attachment as $attachment ) { ?>
<div class="single-item-collection--attachments-img">
<a href="<?php echo $attachment->guid; ?>" target="_BLANK">
<a href="<?php echo $attachment->guid; ?>" data-toggle="lightbox" data-gallery="example-gallery">
<?php
echo wp_get_attachment_image( $attachment->ID, 'tainacan-interface-item-attachments' );
?>