Responsive Polaroid Gallery With Lightbox Integration – Vintalight.js

Category: Gallery , Javascript , Recommended | February 18, 2018
Author: Jopzik
Views Total: 2,422 views
Official Page: Go to website
Last Update: February 18, 2018
License: MIT

Preview:

Responsive Polaroid Gallery With Lightbox Integration – Vintalight.js

Description:

The Vintalight.js library lets you create a responsive Polaroid-style photo gallery with image lightbox integration. Built with Pug, SASS and vanilla JS (Babel).

How to use it:

Insert the compiled version of the Vintalight.js into the document.

<link rel="stylesheet" href="style.css">
<script src="script.js"></script>

Add images to the gallery.

<section class="vintalight" id="vintalight">
  <figure class="vintalight__container">
      <div class="vintalight__container__photo">
          <img class="vintalight__container__photo__img" src="https://images.pexels.com/photos/69969/pexels-photo-69969.jpeg?w=1260&amp;h=750&amp;auto=compress&amp;cs=tinysrgb"
              alt="Happy Moment">
      </div>
      <figcaption class="vintalight__container__caption">
          <h3 class="vintalight__container__caption__text">Happy Moment</h3>
      </figcaption>
  </figure>
  <figure class="vintalight__container">
      <div class="vintalight__container__photo">
          <img class="vintalight__container__photo__img" src="https://images.pexels.com/photos/247929/pexels-photo-247929.jpeg?h=350&amp;auto=compress&amp;cs=tinysrgb"
              alt="Happy Moment">
      </div>
      <figcaption class="vintalight__container__caption">
          <h3 class="vintalight__container__caption__text">Happy Moment</h3>
      </figcaption>
  </figure>
  <figure class="vintalight__container">
      <div class="vintalight__container__photo">
          <img class="vintalight__container__photo__img" src="https://images.pexels.com/photos/92866/pexels-photo-92866.jpeg?h=350&amp;auto=compress&amp;cs=tinysrgb"
              alt="Happy Moment">
      </div>
      <figcaption class="vintalight__container__caption">
          <h3 class="vintalight__container__caption__text">Happy Moment</h3>
      </figcaption>
  </figure>
  <figure class="vintalight__container">
      <div class="vintalight__container__photo">
          <img class="vintalight__container__photo__img" src="https://images.pexels.com/photos/331986/pexels-photo-331986.jpeg?h=350&amp;auto=compress&amp;cs=tinysrgb"
              alt="Happy Moment">
      </div>
      <figcaption class="vintalight__container__caption">
          <h3 class="vintalight__container__caption__text">Happy Moment</h3>
      </figcaption>
  </figure>
  <figure class="vintalight__container">
      <div class="vintalight__container__photo">
          <img class="vintalight__container__photo__img" src="https://images.pexels.com/photos/296649/pexels-photo-296649.jpeg?h=350&amp;auto=compress&amp;cs=tinysrgb"
              alt="Happy Moment">
      </div>
      <figcaption class="vintalight__container__caption">
          <h3 class="vintalight__container__caption__text">Happy Moment</h3>
      </figcaption>
  </figure>
  <figure class="vintalight__container">
      <div class="vintalight__container__photo">
          <img class="vintalight__container__photo__img" src="https://images.pexels.com/photos/219776/pexels-photo-219776.jpeg?h=350&amp;auto=compress&amp;cs=tinysrgb"
              alt="Happy Moment">
      </div>
      <figcaption class="vintalight__container__caption">
          <h3 class="vintalight__container__caption__text">Happy Moment</h3>
      </figcaption>
  </figure>
</section>

Customize the gallery by overriding the default SASS variables as displayed below:

$size: 30px; 
$resize: 0.7; 
$fig-width: 10.5em;
$fig-height: 12.25em; 
$photo-size: 9.25em; 
$font-size: 1em; 
$font-view: "Roboto", sans-serif; 
$font-description: 'Nanum Pen Script', cursive;

You Might Be Interested In:


One thought on “Responsive Polaroid Gallery With Lightbox Integration – Vintalight.js

  1. amit

    I’m not a developer so I was wondering if I could use the codes in my divi WordPress theme. And if so can you please explain your steps a little slower?

    Thank you

    Reply

Leave a Reply