ember-perfect-gallery

0.1.1 • Public • Published

ember-perfect-gallery

Beautifully positions a set of images in a responsive gallery.

Inspired by perfect-layout & chromatic.io.

Full screen

Resized

Usage

{{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,
},
...
]

Installation

  • git clone https://github.com/myartsev/ember-perfect-gallery.git this repository
  • cd ember-perfect-gallery
  • npm install
  • bower install

Running

  • ember serve
  • Visit the dummy test app (from ember-perfect-gallery/tests/dummy) at http://localhost:4200.

Running Tests

TODO: Need to write tests, help wanted if you can contribute

  • npm test (Runs ember try:each to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit https://ember-cli.com/.

Readme

Keywords

Package Sidebar

Install

npm i ember-perfect-gallery

Weekly Downloads

2

Version

0.1.1

License

MIT

Last publish

Collaborators

  • myartsev