Type:Countdown - pvande/Tranquil GitHub Wiki
{
"type": "countdown",
"url": "/jsonp?url=https://raw.github.com/gist/bd4aa53571f6e33af289/countdown-data.json&callback=?"
}
-
url
The URL to fetch JSONP data from. The name of the JSONP callback function should be represented as a
?
, and should be the last query parameter. -
data
A Javascript object containing an example of the data being consumed by the widget. This will be used as a stand-in for data from the URL before the initial load, and can be used as a substitute for the URL's data (e.g. for development).
-
interval
The time to wait before polling
url
for data updates, in milliseconds. Defaults to one minute. -
filter
The name of (or path to) a Javascript function. The named function will be invoked with each JSON object requested, and its return value will be used as the widget's data source. Defaults to the identity function.
-
template
A Javascript object containing Mustache templates to be used as partials.
-
event
Used to render the event title. Defaults to
'{{title}}'
. -
progressive
Used to describe the event with respect to time. Defaults to
'will happen in'
. -
time
Used to describe how far in the future the event is. Defaults to
'{{daysFromNow}} days'
. -
content
Used to render the HTML content for the widget. Defaults to
'<span class="event">{{>event}}</span>{{>progressive}}<span class="time">{{>time}}</span>'
.
-
Default (Expected)
{
"title": "Release of v1.0",
"daysFromNow": 3,
}