• This repository has been archived on 25/Oct/2021
  • Stars
    star
    114
  • Rank 298,340 (Top 7 %)
  • Language
    CSS
  • Created over 12 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

jQuery photo wall gallery plugin (like in google)

jQuery photo wall gallery plugin (like at google)

Demo

How to use

Add three lines to the HEAD:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="jquery-photowall.js"></script>
<link rel="stylesheet" type="text/css" href="jquery-photowall.css">

Add this to page code:

<div id="gallery">
        <div class="body">
        </div>
</div>

Example 1: Load images from Picasa

<script type="text/javascript">
$(document).ready(function(){
    PhotoWall.init({
        el:             '#gallery'               // Gallery element
        ,zoom:          true                     // Use zoom
        ,zoomAction:    'mouseenter'             // Zoom on action
        ,zoomTimeout:   500                      // Timeout before zoom
        ,zoomDuration:  100                      // Zoom duration time
        ,showBox:       true                     // Enavle fullscreen mode
        ,showBoxSocial: true                     // Show social buttons
        ,padding:       10                       // padding between images in gallery
        ,lineMaxHeight: 150                      // Max set height of pictures line
                                                 // (may be little bigger due to resize to fit line)
    });

    /*

        Photo object consist of:

        {   // big image src,width,height and also image id
            id:
            ,img:       //src
            ,width:
            ,height:
            ,th:{
                src:      //normal thumbnail src
                zoom_src: //zoomed normal thumbnail src
                zoom_factor: // factor of image zoom
                ,width:   //width of normal thumbnail
                ,height:  //height of normal thumbnail
            }
        };

    */

    //For example one of my gallery at Picasa
    $.ajax({
                url: 'https://picasaweb.google.com/data/feed/api/user/118283508237214694671/albumid/5685978516288199793'
                         +'/?alt=json&fields=entry(gphoto:id,title,media:group(media:thumbnail,media:'
                         +'content))&imgmax=720',
                dataType: 'jsonp',
                success: function(data){
                    var photos = {}
                if(!data.feed.entry) return;
                for(var i in data.feed.entry) {
                        var e     = data.feed.entry[i].media$group;
                        var id    = data.feed.entry[i].gphoto$id.$t;

                        var t1h   = e.media$thumbnail[2].height;
                        var t1w   = e.media$thumbnail[2].width;
                        var t1src = e.media$thumbnail[2].url

                        var t2w   = Math.round(t1w * 1.5);
                        var t2h   = Math.round(t1h * 1.5);

                        var t2src = e.media$content[0].url+'/../../w'+t2w+'-h'+t2h+'/';

                    var bsrc  = e.media$content[0].url;
                    var bw    = e.media$content[0].width;
                    var bh    = e.media$content[0].height;


                        photos[id] = {id:id,img:bsrc,width:bw,height:bh,th:{src:t1src,width:t1w,height:t1h,zoom_src:t2src,zoom_factor:1.5}};

                }
                    PhotoWall.load(photos);
            }
        });

</script>

Example 2: load images from site:

<script type="text/javascript">
$(document).ready(function(){
    PhotoWall.init({
        el:             '#gallery'               // Gallery element
        ,zoom:          true                     // Use zoom
        ,zoomAction:    'mouseenter'             // Zoom on action
        ,zoomTimeout:   500                      // Timeout before zoom
        ,zoomDuration:  100                      // Zoom duration time
        ,showBox:       true                     // Enavle fullscreen mode
        ,showBoxSocial: true                     // Show social buttons
        ,padding:       10                       // padding between images in gallery
        ,lineMaxHeight: 150                      // Max set height of pictures line
                                                 // (may be little bigger due to resize to fit line)
    });

    /*

        Photo object consist of:

        {   // big image src,width,height and also image id
            id:
            ,img:       //src
            ,width:
            ,height:
            ,th:{
                src:      //normal thumbnail src
                zoom_src: //zoomed normal thumbnail src
                zoom_factor: // factor of image zoom
                ,width:   //width of normal thumbnail
                ,height:  //height of normal thumbnail
            }
        };

    */

    var PhotosArray = new Array(
        {id:id,img:'img_big1.jpg',width:500,height:400,
         th:{src:'img_small1.jpg',width:50,height:40,
             zoom_src:'img_zoomed1.jpg',zoom_factor:4
            }
        },
        {id:id,img:'img_big2.jpg',width:500,height:400,
         th:{src:'img_small2.jpg',width:50,height:40,
             zoom_src:'img_zoomed2.jpg',zoom_factor:4
            }
        },
        {id:id,img:'img_big3.jpg',width:500,height:400,
         th:{src:'img_small3.jpg',width:50,height:40,
             zoom_src:'img_zoomed3.jpg',zoom_factor:4
            }
        },
        {id:id,img:'img_big4.jpg',width:500,height:400,
         th:{src:'img_small4.jpg',width:50,height:40,
             zoom_src:'img_zoomed4.jpg',zoom_factor:4
            }
        }
    );

    PhotoWall.load(PhotosArray);
    });

</script>

More Repositories

1

MiBand2

Library to work with Xiaomi MiBand 2
Python
538
star
2

object_detection_projects

My public projects about object detection algorithms
Python
345
star
3

hdrnet-pytorch

Unofficial PyTorch implementation of 'Deep Bilateral Learning for Real-Time Image Enhancement', SIGGRAPH 2017 https://groups.csail.mit.edu/graphics/hdrnet/
Python
218
star
4

computer_vision

Some computer vision tutorials for my articles
Jupyter Notebook
117
star
5

Python-Shape-Context

Shape context processing with python
Python
52
star
6

deezer_playlist_mp3_downloader

Download MP3 from Deezer playlist
Python
45
star
7

python-pinterest-api

Pinterest API for Python
Python
33
star
8

full_node_blockchain

Demo project for article on how the PoW blockchain works
Python
32
star
9

awesome-free-courses

Here i will gather courses that i passed and think that they give good amount materials in short period of time with good clarification of each step.
18
star
10

jquery-multi-step-form

Multi step form with progress bar for jquery
CSS
14
star
11

start-learn-pentesting-red-team

13
star
12

RussianTTS-Tacotron2

Roff
12
star
13

Python-Facebook-SDK

Unofficial Python Facebook SDK
Python
12
star
14

neo4j-kernel-plugin-example

Example of Neo4j Kernel Plugin.
Java
9
star
15

AJAX-calls-intercepter

Intercept all ajax calls. Usefull for wrapping ajax calls with some options. For example for web proxies.
9
star
16

aws-docker-example

Deploying on AWS Free Tier with Docker andย Fabric
Python
8
star
17

django-fuzzytest

This is the automatic Fuzzy Test tool for testing Django applications.
Python
8
star
18

ReCaptcha-resolver

Some work in recaptcha resolving
Python
7
star
19

jquery-an-showbox

jQuery plugin that used to overlay images on the current page for creating full-screen gallery view
4
star
20

mlclubua

Python
4
star
21

PyKetama

Ketama consistent hash algorithm for python
Python
3
star
22

keras-tools

Some tools for Keras
Python
3
star
23

react-native-splash-screen

Native splash screen for react-native applications.
Java
2
star
24

gofmtc

Custom Go code formatting
Go
2
star
25

Painterly-Rendering

Painterly Rendering Algorithms, just for fun)
Python
2
star
26

django-nosetests

Nose test runner for Django with cool html reports
Python
2
star
27

video_bounding_boxes_creator

Simple Qt5 app for tagging bounding boxes in video frames to create dataset for object detection
Python
2
star
28

Sphinx-protocol-for-Twisted

Python
2
star
29

creotiv.github.com

HTML
1
star
30

halide_bilateral_slice_apply

Bilateral slice apply opration for PyTorch written in Halide
Python
1
star
31

audio-tools

Tools for creating audio datasets
Python
1
star
32

gflib

Gevent Framework Library
Python
1
star
33

Arduino-SkyRover-IR-Receiver-Decode

Project to understand IR receiver protocol + to decode IR protocol for SkyRover Navigator
Arduino
1
star
34

react-native-appreview

App review dialog with stars
JavaScript
1
star
35

architecture

Tutorials, examples, ideas, tools, etc.
Go
1
star