A Dashing widget that shows the current xkcd comic.
The widget will display the current comic if it was published today, and otherwise it will find a random one. This ensures there is a new comic shown every day.
The only dependency is json.
Add it to Dashing's Gemfile:
gem 'json'
and run bundle install
.
To use this widget, simply run:
dashing install fd453f2c31a9d0131c52
To add the widget to your dashboard, include the following snippet in the layout file:
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-view="DailyXKCD" data-id="xkcd-of-the-day"></div>
</li>
The job to fetch a comic is run every day.
Is there any way to make sure that the widget does not exceed its size if the image is larger than the available space?