Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/micahstubbs/material-photo-gallery

a vanilla JavaScript material design photo gallery plugin
https://github.com/micahstubbs/material-photo-gallery

Last synced: about 1 month ago
JSON representation

a vanilla JavaScript material design photo gallery plugin

Awesome Lists containing this project

README

        

# Material Photo Gallery

a vanilla JavaScript [material design](https://material.io/design/) photo gallery plugin built with design inspiration from [Google Photos](https://photos.google.com/)

[![scaled-material-photo-gallery](https://user-images.githubusercontent.com/2119400/47237268-63a1c700-d393-11e8-8798-d8d8b264ed23.png)](//micahstubbs.github.io/material-photo-gallery/example)

interact with the live example at https://micahstubbs.github.io/material-photo-gallery/example

## Install

#### Usage

```js
var MaterialPhotoGallery = require('material-photo-gallery')

var elem = document.querySelector('.m-p-g')
var gallery = new MaterialPhotoGallery(elem)
```

#### Include Script

```html

```

#### Include Stylesheet

```html

```

#### HTML

```html






```

Specify the path to the full size images with the `data-full` attribute on the thumbnail images.

#### Initialize Plugin

```js
// Select gallery element.
var elem = document.querySelector('.m-p-g')

// Init gallery
var gallery = new Gallery(elem)
```

## Browser Support

- Latest Edge
- Latest Chrome
- Latest Firefox
- Latest Safari

## Credits

This project uses [imagesLoaded by David DeSandro](https://github.com/desandro/imagesloaded), and [Google Image Layout by ptgamr](https://github.com/ptgamr/google-image-layout).

This project is a fork of https://github.com/TrueValentine/material-photo-gallery that modernises the codebase and adds new features, like swipe gestures on mobile to navigate the gallery from the detail view.

See also the [Bricks](https://github.com/ArjanJ/bricks) image layout library from [ArjanJ](https://github.com/ArjanJ)

## License

MIT license