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 install
Build the things:
npm run sass
npm run js
Python the pythons:
cd demo
virtualenv .
source bin/activate
pip install -r requirements.txt
Start the demo server:
python demo.py