An Ember component that maintains the correct aspect ratio for an image, useful in responsive layouts. The addon also provides the bare minimum of CSS styles to get the responsive image working.
Similar to how responsive images are handled on Medium
$ npm install ember-aspect-ratio-image --save-dev
Note that 0.1.0
requires Ember 1.13.0+. If you're on an older version of
Ember, use 0.0.x
You can use your own image element (eg. when you want to add class names, etc.),
just don't forget the width
/height
properties...
You must provide:
width
height
src
This README outlines the details of collaborating on this Ember addon.
git clone
this repositorynpm install
bower install
ember server
- Visit your app at http://localhost:4200.
ember test
ember test --server
ember build
For more information on using ember-cli, visit http://www.ember-cli.com/.
Copyright (c) 2015 Gabor Babicz (MIT License)