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.
Matt, this is awesome.
I'd love to use it, but so far I haven't been able to successfully use the
dashing install
command (getting weird SSL errors).I tried just manually placing the .coffee, .scss, and .html for the widget into a
dailyxkcd
folder in thewidgets
folder, putting thedaily_xkcd.png
image in /assets/images, and puttingdaily_xkcd.rb
into the jobs folder.Everything builds but I get a blank white column with no comic.
I'm a bit of an amateur. Can you think of anything else I need to do in order to install your widget manually?
Thanks!