jQuery Plugin to Embed Giphy Images – Bootstrap Giffy Gallery

The Giffy Gallery is a jQuery & Bootstrap powered plugin to embed Giphy images on website. It use the GIPHY API to get animated images with specific tag / keyword from Giphy. The plugin also lets users to add category (from front-end) from which it load gif images.

Plugin Overview

Plugin: Giffy-Gallery
Author: Chris Ross
Licence: MIT Licence
Published: May 26, 2019
Repository: Fork on GitHub
Dependencies: jQuery 1.3.1 or Latest version and Bootstrap 4.1.3
File Type: zip archive (HTML, CSS & JavaScript )
Package Size: 55.2 KB

How to Use jQuery Giffy Gallery

1. Load the jQuery and Bootstrap CSS into your HTML document.

<!-- jQuery -->
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>

<!-- Bootstrap CSS -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">

2. Also, include Giffy Gallery CSS and JavaScript file in your webpage.

<!-- Giffy Gallery CSS -->
<link rel="stylesheet" type="text/css" href="assets/css/style.css">

<!-- Giffy Gallery Js -->
<script type="text/javascript" src="assets/javascript/app.js"></script>

3. Create HTML structure for Gallery as follows.

<div id="divGallery" class="container">
   <div class="row">
      <div id="divButtons" class="col col-lg-12"></div>
   </div>
   <div class="row">
      <div class="col col-lg-7 text-center m-3">
         <input type="text" class="mb-1" id="txtCategory" maxlength="20">
         <button id="btnSaveCategory" class="btn btn-info">Add Category</button>
      </div>
      <div class="col col-lg-4 text-center m-3">
         <button id="btnReset" class="btn btn-danger invisible">Clear Giffs</button>
         <button id="btnDelLocal" class="btn btn-danger invisible">Delete User Buttons</button>
      </div>
   </div>
</div>

4. The basic CSS styles to customize the overall gallery page.

body{
    background-color: gray;
    background-image: url("../images/grey_wash_wall.png");
    height:100%;
}
header{
    border-bottom: 2px solid #66ffff;
}
img{
    width:100%;height:auto;
}
.card{
    cursor:pointer;
    width:100%;
}
.col-md-2{
    min-width: 150px;
}

@media screen and (max-width:667px){
    ul{
        padding-left:1px;
    }
    .container{
        margin-bottom:160px;
    }
    .display-5{
        font-size: 10px;
    }
}