3.1.3 • Published 9 years ago
@cnbritain/wc-common-picture v3.1.3
wc-common-picture
Web component that displays elements
Settings
| Key | Optional | Default | Description |
|---|---|---|---|
| image_crops | false | A list of images | |
| breakpoints | true | None | The breakpoints to set the images to |
| lazyload | true | True | Whether the image will lazyload |
| class | true | '' | Additional classes to set on the image |
| alt | true | None | Alt text for the image |
JS Settings
common-picture
common-picture.init()
Initialises the loading of images
Kind: static method of common-picture
Prerequisites:
Demo:
Install dependencies:
npm installBuild the things:
npm run sass
npm run jsPython the pythons:
cd demo
virtualenv .
source bin/activate
pip install -r requirements.txtStart the demo server:
python demo.py