Update: feeling adventurous? Clone or fork the xkcd clock! If you just want to see it in action or get a glimpse of how it works, keep reading.
The date in xkcd's comic number 1340 does not change.
Since Randall publishes his comics under a permissive license, anyone can fix this problem and let the guy focus on more important issues, like writing great comics.
We propose the following approach:
- Grab the original image and erase the date using a raster graphics editor, such as the GIMP.
- Save the image to PNG and convert it to base 64.
- Obtain the xkcd font and convert it to a web font using FontSquirrel's font-face generator. Select the "expert" mode and check "Base 64 encode."
- Put all the parts together with HTML, CSS and Javascript, just like in the reference implementation
The results can be seen in http://jsfiddle.net/Lej6m/4/.
In the spirit of the HTML clocks posted on HN, it is possible to make Cueball update its speech bubble every second, making http://jsfiddle.net/Lej6m/25/ the first instance of an xkcd-inspired clock that the author is aware of.
In this Gist, we have shown that it is possible to waste one's time to build an awesome clock using an xkcd comic strip as a clock face. The techniques shown in this work can be extended to other webcomics, or to newspaper comics that have been previously scanned.
Acknowledgements: Randall Munroe for the comics, Kyle Kelley and/or Brian E. Granger for the xkcd font, Mads Kristensen for the image to base64 converter and Font Squirrel for the font converter tool.
If you add the following CSS to the
#xkcddate
section, the cursor won't change and you won't be able to highlight the text, just like an image. (see http://jsfiddle.net/7CTBr/2/)