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
- TopStoriesNavigation
- new TopStoriesNavigation(el)
- .el :
HTMLElement
- .nextItems()
- .previousItems()
- .scrollTo(x)
new TopStoriesNavigation(el)
Param | Type |
---|---|
el | HTMLElement |
HTMLElement
topStoriesNavigation.el : 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:
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