-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sean Codes
authored
Nov 17, 2017
1 parent
882c748
commit a180b82
Showing
1 changed file
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,47 @@ | ||
# kanban | ||
Pure JavaScript KanBan: [Live Demo](https://sean-codes.github.io/kanban/example/basic.html) | ||
> Pure JavaScript KanBan: | ||
## Demo | ||
![example](https://github.com/sean-codes/kanban/blob/master/image.gif?raw=true) | ||
Try out the [demo](https://sean-codes.github.io/kanban/example/basic.html) | ||
|
||
## Setup | ||
```js | ||
var kanban = new Kanban({ | ||
selector: '#myKanBan', | ||
lanes: [ | ||
{ title: 'Lane 1', name: 'lane1' } | ||
], | ||
title: (title) => { return title }, | ||
content: (content) => { content }, | ||
cards: [ | ||
{ | ||
lane: 'lane1', | ||
content: 'Test Card 1' | ||
}, | ||
{ | ||
lane: 'lane2', | ||
content: 'Test Card 2' | ||
} | ||
] | ||
}) | ||
``` | ||
|
||
The options are detailed below. | ||
|
||
#### `lanes [array]` | ||
|
||
An array of lanes. A lane has title and id. The title value is passed to the title callback | ||
|
||
#### `cards [array]` | ||
|
||
An array of cards. A card requires a lane and content. The content value is passed to the content callback | ||
|
||
#### `title [function` | ||
|
||
Called when creating a lane. return the html to be placed within lane title | ||
|
||
#### `content [function]` | ||
|
||
Called when creating a card. return the html to be placed within a cards content | ||
|