davide-casiraghi/laravel-responsive-gallery

A PHP library to create responsive galleries that are organized into Pinterest like columns.

1.1.4 2019-05-27 17:05 UTC

This package is auto-updated.

Last update: 2024-04-22 02:17:04 UTC


README

Latest Stable Version Build Status StyleCI Quality Score Coverage Status 68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f38346232323062663365333731386139616663362f6d61696e7461696e6162696c697479 GitHub last commit

Laravel Responsive Gallery 🏞

A PHP library to create responsive galleries that are organized into Pinterest like columns.
To generate the grid is used Bricklayer.js. To open the image in a popup is used Fancybox 3.

The snippet

The library replace all the occurrences of this kind of snippet

{# gallery src=[holiday_images/london] column_width=[250] gutter=[20] #}

With the HTML code of a responsive gallery.

<div class='responsiveGallery bricklayer' data-column-width="250" data-gutter="20">
    <div class='box'>
        <a href='gallery/holidays/IMG_1584.jpg' data-fancybox='images' data-caption=''>
            <img src='gallery/holidays/thumb/IMG_1584.jpg' />
        </a>
    </div>
    <div class='box'>
        <a href='gallery/holidays/IMG_1244.jpg' data-fancybox='images' data-caption=''>
            <img src='gallery/holidays/thumb/IMG_1244.jpg' />
        </a>
    </div>
    ...
</div>

The images data management interface (optional)

Trough this interface you can specify for each image:

  • the alt text
  • the description shown below the fancy box when the user click on the thumbnail
  • a youtube or vimeo link (in this case a play icon will be show above the image and clicking on it will open a fancybox showing the related video)

Once you have published the views in your Laravel application, you can access to the images management interface at this address www.yourwebsite.com/responsive-gallery/

The snippet works also without using the images data management interface.

How to use it

Read Tutorial and Documentation →

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT