0.1.1 • Published 8 years ago

ember-perfect-gallery v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
8 years ago

ember-perfect-gallery

Beautifully positions a set of images in a responsive gallery.

Inspired by perfect-layout & chromatic.io.

Full screen

npm.io

Resized

npm.io

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

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/.