@cnbritain/wc-top-storiesdeprecated

Displays a list of landscape cards

Usage no npm install needed!

<script type="module">
  import cnbritainWcTopStories from 'https://cdn.skypack.dev/@cnbritain/wc-top-stories';
</script>

README

wc-top-stories

Displays a list of landscape cards

Macro Settings

Key Optional Default Description
items false Items to display in the list
brand true 'default' Brand to use for theme
title true 'Top stories' Title to display above the list
ad_config true None Ad configuration

JS Documentation

TopStoriesNavigation

Kind: global class

new TopStoriesNavigation(el)

Param Type
el HTMLElement

topStoriesNavigation.el : HTMLElement

The top stories element

Kind: instance property of TopStoriesNavigation
Access: public

topStoriesNavigation.nextItems()

Scrolls the element to the next items

Kind: instance method of TopStoriesNavigation
Access: public

topStoriesNavigation.previousItems()

Scrolls the element to the previous items

Kind: instance method of TopStoriesNavigation
Access: public

topStoriesNavigation.scrollTo(x)

Scrolls the element to the x location

Kind: instance method of TopStoriesNavigation
Access: public

Param Type
x Number

Themes

  • Wired

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