Giter Club home page Giter Club logo

galereya's Introduction

DEPRECATED

This plugin is depricated, use CSS flexbox, CSS grid layouts (with polyfills) or other libraries instead.

Galereya

Responsive, easily customizable jquery gallery with a masonry layout. Almost all animation and effects are based on CSS features.

View Demo

Browser compatibility

Works on Chrome, Safari, Firefox, Opera(turned off some CSS animations), IE7+(Graceful degradation), Android browser, Chrome mobile, Firefox mobile, Safari on iOS and etc. Galereya effects and browser compatibility depends on your custom CSS styles a lot!

Rapid start

<head>
	<meta charset="utf-8" />
	<title>Galereya</title>
    <link href="css/jquery.galereya.css" rel="stylesheet"/>
    <!--[if lt IE 9]>
    <link rel="stylesheet" href="css/jquery.galereya.ie.css">
    <![endif]-->

    <script src="js/jquery.min.js"></script>
    <script src="js/jquery.galereya.min.js"></script>
    <script>
        $(function() {
            $('#galleryherepls').galereya();
        });
    </script>
</head>
<body>
    <div id="galleryherepls">
        <img src="path/to/thumbnail"
            alt="Title here"
            title="Or here(more priority)"
            data-desc="some description"
            data-category="image category here"
            data-fullsrc="path/to/full/image."
        />        
        ...        
        <img src="imgs/thumbnails/image42.jpg"
            alt="Image"
            data-desc="Example"
            data-fullsrc="imgs/image42.jpg"
        />
    </div>
</body>

OR

<head>
	<meta charset="utf-8" />
	<title>Galereya</title>
    <link href="css/jquery.galereya.css" rel="stylesheet"/>
    <!--[if lt IE 9]>
    <link rel="stylesheet" href="css/jquery.galereya.ie.css">
    <![endif]-->

    <script src="js/jquery.galereya.min.js"></script>
    <script>
        $(function() {
            $('#galleryherepls').galereya({
                load: function(next) {
                    $.getJSON('images.json', function(data) {
                        next(data);
                    });
                }
            });
        });
    </script>
</head>
<body>
    <div id="galleryherepls"></div>
</body>

Options

Transition durations, cells width and all other parameters, except below ones, are read from your CSS! This allows you to do a lot of different customizations for Galereya without any pain.

Options and their default values:

    $('#galleryherepls').galereya({
            //spacing between cells of the masonry grid
            spacing: 0,
            
            //waving visual effect
            wave: true,
            
            //waving visual effect timeout duration
            waveTimeout: 300,

            // special CSS modifier for the gallery
            modifier: '',
            
            //speed of the slide show
            slideShowSpeed: 10000,
            
            //speed of appearance of cells
            cellFadeInSpeed: 200,
            
            //the name of the general category
            noCategoryName: 'all',
            
            //set to true, if you don't want to show the slider on the cell click.
            disableSliderOnClick: false,
            
            //loading of images from JS. Just pass data to the callback 'next'.            
            load: function(next) {
                //Data structure example
                var data = [{"lowsrc":"upload\/thumbnails\/5165b70278e0e2.80829014.jpg","fullsrc":"upload\/5165b70278e0e2.80829014.jpg","description":"Mehmet Dere","category":"drawing"}]
                next(data);
            },

            //Cell click handler. Works even when the 'disableSliderOnClick' property is true.
            onCellClick: function(e) {}
    });

Methods

Calling example:

var gallery = $('#gal1').galereya();
gallery.openSlider(5);
Method Description
openSlider(visibleIndex) Open the slider. visibleIndex parameter is an index of a set of visible cells.
closeSlider() Yes, close it.
changeCategory(categoryName) Show a special category of images. categoryName is a name of a category.
startSlideShow() Start a slide show.
stopSlideShow() Stop a slide show.
nextSlide() Go to the next slide, if the slider is opened.
prevSlide() Go to the previous slide, if the slider is opened.
loadMore(data) Load additional images to the galereya. data is an object like in the load function.

Customization

Simple example

galereya's People

Contributors

mrbig avatar vodkabears avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

galereya's Issues

how to hide as default "all" grid cells

Might not be an issue.
When using the demo version to the basic Galereya, the drop down menu displays "ALL" image thumbnails by default. Anyway of hiding all thumbnails and then showing thumbnails once the drop down menu is activated?

Using galereya with Infinite scroll?

I am trying to integrate galereya with InfiniteScroll . The issue occurs when I attempt to initiate galereya on the new images with infinite scrolls callback. All images disappear.

the callback is set up as so:

function( newElements ) { $('#gallery').galereya(); }
Any way to call galereya on the newly loaded images?
An alternative I thought of was if I load using your var= data[] method, is there a way to load a certain number of images this way using a click function calling

 next(data);

As an example, if you had a gallery of 100 images, is it possible to set the number of images in the data array to load initially (say the first 20 images) and then load additional sets of 20 by using a click function?

Assign a footer to the gallery

Hi

I'm using your plugin in one of my projects and I would like to have a footer on the bottom of the gallery, right now it always get's to the top of the gallery.

Could you point me to the right direction please?

Thanks

Galerya Changes Position of Footer

Hi! I am using galereya and every time I add a new picture it pushes my footer up and underneath the the row of photos. I have no clue why this is happening, since it doesn't happen to any of my pages that do not include the plug in.

This is what it looks like now:

screen shot 2013-11-21 at 5 02 29 pm

When it is in responsive/mobile mode however it doesn't do that and the footer is positioned at the bottom, so again I have no clue what is going wrong.

This is my CSS for my footer:

    footer{
        clear: both;
        height: 120px;
        text-align: center; 
        background:#b0cef4;
        padding-top: 60px;
        width: 100%;

    }

    footer a span{
    display: none;
    }

If someone could PLEASE help me that would be greatly appreciate.

Slider breaking after 5 items

Randomly and most times, the slider seems to struggle on mobile browsers after sliding past 5 items. It drags and takes a lot more time to slide to the next item

galereya - Plugins

Hi VodkaBears,

I love your plugins but, I am trying to prove your plugins and do not know that I am doing badly. I have used the first form for its functioning but the images don't show in the screen.
There is a message of mistake in javascript and says this:
-Uncaught TypeError: Cannot read property 'length' of undefined in line 220 = for (var i = 0, len = items.length, article, $img; i len; i ++) {

Can you help me?
This is my demo http://www.mediafire.com/?4rvc0h8fec4l1n8

thanks.

Adding a gap at the bottom of the page, and photo gallery(calling them from thumbnail photo in main page).

Hi VodkaBears, thanks for the hard effort on galereya plugin.

I'm a web designer, jquery knowledge very limited, but I find this plugin very cool and suitable as online portfolio. No fancy effect, all transition are sleek enough.

However, regarding the the plugin, is that possible to create a gap or space at the bottom of the thumbnail container? I've tried many ways with css, but nothing came through.

And secondly, is that possible to create a photo gallery for each thumbnail?
The next and right button would be next or previous project, and when scroll up and down will navigate through the project photos.

Thanks again!

Galereya slider description

Galereya slider description appears for half of a second then dissapears on mobile device. Instead of description there is only white space now. Any clue what's wrong?

Preloading the next image in the slideshow

I love your script! It works great and looks beautiful and was easy to mod out to make it fade instead of slide.

However, Everytime we click on an image, we see the loading bar and then the image pops up. I'd like to preload the next image so that we have a much lower chance of seeing the loader.

Is this possible? I'm too rusty with JS to pull it off on my own.

issue with absolute positioning

each individual images seems to be absolutely positioned. So if there are other elements below the image gallery it ends up like this:

gallery

Here's my code:

        <div id="photos">        
          @foreach($photos as $photo)
            <img src="/uploads/photos/small-{{ $photo->filename }}" data-fullsrc="/uploads/photos/{{ $photo->filename }}">
          @endforeach
        </div>
$('#photos').galereya({
    wave: false
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.