Beautifully positions a set of images in a responsive gallery.
Inspired by perfect-layout & chromatic.io.
{{ember-perfect-gallery photos=model}}
where photos is a JSON array consisting of:
Required properties:
- src: Where the image is located
- ratio: (image width / image height). Necessary for computing image element positions.
Optional properties:
- href: If present, this will be used as the link associated with this image
[{
"src": "path/to/images/1.jpg",
"ratio": 0.95907928388,
"href": "https://github.com/myartsev/ember-perfect-gallery"
}, {
"src": "path/to/images/2.jpg",
"ratio": 1.49925037481,
},
...
]
git clone https://github.com/myartsev/ember-perfect-gallery.git
this repositorycd ember-perfect-gallery
npm install
bower install
ember serve
- Visit the dummy test app (from ember-perfect-gallery/tests/dummy) at http://localhost:4200.
TODO: Need to write tests, help wanted if you can contribute
npm test
(Runsember try:each
to test your addon against multiple Ember versions)ember test
ember test --server
ember build
For more information on using ember-cli, visit https://ember-cli.com/.