@cnbritain/wc-common-picturedeprecated

Web component that displays elements

Usage no npm install needed!

<script type="module">
  import cnbritainWcCommonPicture from 'https://cdn.skypack.dev/@cnbritain/wc-common-picture';
</script>

README

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:

  • Node.jsbrew install node
  • Grunt - npm install -g grunt-cli
  • Other prereqs? Python? Virtualenv?

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