Gallery
JavaScript based lightbox component for presenting various types of media.
Cartzilla component
Gallery component relies on 3rd party plugin. Make sure to link to Light Gallery css and js files in your document: vendor/lightgallery/css/lightgallery-bundle.min.css and vendor/lightgallery/lightgallery.min.js. If you need extra features like zooming, fullscreen view or video you need to include additional plugins:
- vendor/lightgallery/plugins/fullscreen/lg-fullscreen.min.js
- vendor/lightgallery/plugins/zoom/lg-zoom.min.js
- vendor/lightgallery/plugins/video/lg-video.min.js
For Carousel example you will need Tiny Slider plugin css and js linked to your document: vendor/tiny-slider/dist/tiny-slider.css and vendor/tiny-slider/dist/min/tiny-slider.js.
Use this page as a reference.
Media: Image
<!-- Image gallery -->
<div class="gallery">
<a href="path-to-large-image" class="gallery-item rounded-3" data-sub-html='<h6 class="fs-sm text-light">Gallery image caption</h6>'>
<img src="path-to-thumbnail-image" alt="Gallery thumbnail">
<span class="gallery-item-caption">Gallery image caption</span>
</a>
</div>
// Image gallery
.gallery
a(href="path-to-large-image", data-sub-html='<h6 class="fs-sm text-light">Gallery image caption</h6>').gallery-item.rounded-3
img(src="path-to-thumbnail-image", alt="Gallery thumbnail")
span.gallery-item-caption Gallery image caption
Media: Video
<!-- Video gallery -->
<div class="gallery" data-video="true">
<a href="link-to-youtube-video" class="gallery-item video-item rounded-3" data-sub-html='<h6 class="fs-sm text-light">Gallery video caption</h6>'>
<img src="path-to-thumbnail-image" alt="Gallery thumbnail">
<span class="gallery-item-caption">Gallery video caption</span>
</a>
</div>
// Video gallery
.gallery(data-video="true")
a(href="link-to-youtube-video", data-sub-html='<h6 class="fs-sm text-light">Gallery video caption</h6>').gallery-item.video-item.rounded-3
img(src="path-to-thumbnail-image", alt="Gallery thumbnail")
span.gallery-item-caption Gallery video caption
Media: Iframe (Google map)
<!-- Iframe (Google map) -->
<div class="gallery">
<a href="link-to-google-map-embed" class="gallery-item rounded-3" data-iframe="true" data-sub-html='<h6 class="fs-sm text-light">Google map embed</h6>'>
<img src="path-to-thumbnail-image" alt="Gallery thumbnail">
<span class="gallery-item-caption">Google map embed</span>
</a>
</div>
// Iframe (Google map)
.gallery
a(href="link-to-google-map-embed", data-iframe="true", data-sub-html='<h6 class="fs-sm text-light">Google map embed</h6>').gallery-item.rounded-3
img(src="path-to-thumbnail-image", alt="Gallery thumbnail")
span.gallery-item-caption Google map embed
Grid with gutters
<!-- Gallery grid with gutters -->
<div class="row gallery" data-video="true">
<!-- Item -->
<div class="col-xl-4 col-sm-6 mb-grid-gutter">
<a href="path-to-large-image" class="gallery-item rounded-3" data-sub-html='<h6 class="fs-sm text-light">Gallery image caption</h6>'>
<img src="path-to-thumbnail-image" alt="Gallery thumbnail">
<span class="gallery-item-caption">Gallery image caption</span>
</a>
</div>
<!-- Item -->
<div class="col-xl-4 col-sm-6 mb-grid-gutter">
....
</div>
<!-- Add as many columns with gallery item inside as you need -->
</div>
// Gallery grid with gutters
.row.gallery(data-video="true")
//- Item
.col-xl-4.col-sm-6.mb-grid-gutter
a(href="path-to-large-image", data-sub-html='<h6 class="fs-sm text-light">Gallery image caption</h6>').gallery-item.rounded-3
img(src="path-to-thumbnail-image", alt="Gallery thumbnail")
span.gallery-item-caption Gallery image caption
//- Item
.col-xl-4.col-sm-6.mb-grid-gutter
...
//- Add as many columns with gallery item inside as you need
Grid no gutters
<!-- Gallery grid no gutters -->
<div class="row gallery g-0" data-video="true">
<!-- Item -->
<div class="col-xl-4 col-sm-6">
<a href="path-to-large-image" class="gallery-item" data-sub-html='<h6 class="fs-sm text-light">Gallery image caption</h6>'>
<img src="path-to-thumbnail-image" alt="Gallery thumbnail">
<span class="gallery-item-caption">Gallery image caption</span>
</a>
</div>
<!-- Item -->
<div class="col-xl-4 col-sm-6">
....
</div>
<!-- Add as many columns with gallery item inside as you need -->
</div>
// Gallery grid no gutters
.row.gallery.g-0(data-video="true")
//- Item
.col-xl-4.col-sm-6
a(href="path-to-large-image", data-sub-html='<h6 class="fs-sm text-light">Gallery image caption</h6>').gallery-item
img(src="path-to-thumbnail-image", alt="Gallery thumbnail")
span.gallery-item-caption Gallery image caption
//- Item
.col-xl-4.col-sm-6
...
//- Add as many columns with gallery item inside as you need
Inside card
Card with gallery thumbnail
Some quick example text to build on the card title and make up the bulk of the card's content.
Go somewhere<!-- Gallery inside card -->
<div class="card gallery">
<a href="path-to-large-image" class="gallery-item card-img-top" data-sub-html='<h6 class="fs-sm text-light">Gallery image caption</h6>'>
<img src="path-to-thumbnail-image" alt="Gallery thumbnail">
</a>
<div class="card-body">
<h5 class="card-title">Card with gallery thumbnail</h5>
<p class="card-text fs-sm text-muted">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-sm btn-primary">Go somewhere</a>
</div>
</div>
// Gallery inside card
.card.gallery
a(href="path-to-large-image", data-sub-html='<h6 class="fs-sm text-light">Gallery image caption</h6>').gallery-item.rounded-3
img(src="path-to-thumbnail-image", alt"Gallery thumbnail")
.card-body
h5.card-title
| Card with gallery thumbnail
p.card-text.fs-sm.text-muted
| Some quick example text to build on the card title and make up the bulk of the card's content.
a.btn.btn-sm.btn-primary(href="#") Go somewhere
Inside carousel
<!-- Gallery inside carousel -->
<div class="tns-carousel tns-nav-enabled gallery" data-video="true">
<div class="tns-carousel-inner" data-carousel-options='{"responsive": {"0":{"items":1},"576":{"items":2, "gutter": 20},"1200":{"items":3, "gutter": 30}}}'>
<!-- Item -->
<div>
<a href="path-to-large-image" class="gallery-item" data-sub-html='<h6 class="fs-sm text-light">Gallery image caption</h6>'>
<img src="path-to-thumbnail-image" alt="Gallery thumbnail">
<span class="gallery-item-caption">Gallery image caption</span>
</a>
</div>
<!-- Add as many gallery items wrapped in divs as you need -->
</div>
</div>
// Gallery inside carousel
.tns-carousel.tns-nav-enabled.gallery(data-video="true")
.tns-carousel-inner(data-carousel-options='{"responsive": {"0":{"items":1},"576":{"items":2, "gutter": 20},"1200":{"items":3, "gutter": 30}}}')
//- Item
div
a(href="path-to-large-image", data-sub-html='<h6 class="fs-sm text-light">Gallery image caption</h6>').gallery-item.rounded-3
img(src="path-to-thumbnail-image", alt="Gallery thumbnail")
span.gallery-item-caption Gallery image caption
//- Add as many gallery items wrapped in divs as you need