Categories

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

Merry Christmas!

In lieu of my traditional post of Christmas cracker jokes* I bring a lazy but excellent list of Christmas readings:

  1. Scaryduck finally does Condensed History : The Birth of Jesus : the timeless tale of the birth of Our Lord and Saviour, translated into the language of today’s easily bored youth, who are demanding a crate of White Lightning for Christmas or “I’ll cut you wiv ma flicky innit?”

    M. O’Nazareth: Guess what? I met TEH ANGLE OF TEH LORD an’ he sez I’m gonnur hav a puppy called JEBUS an’ we’ve gotta get married an’ everything an’ save TEH WORLD from EVIL an’ an’ an’ we’ll all liv happy evar after WIV A PONY!!!
    J. Carpenter: Wait… WHAT?
    TEH ANGLE OF TEH LORD: What she said, bud. Soz. Orders from above
    J. Carpenter: Oh, COCK
    TEH ANGLE OF TEH LORD: Degree of difficulty — in BETHLEHEM
    J. Carpenter: What? That dump? FAIL

    And so on.

  2. Jesus is born according to the excellent Brick Testament, the Bible in Lego. The frame dealing with the Slaughter of the Innocents is an amazing feat of Lego building.
  3. Not Christmassy as such but still relevant is the full version of Viz’s Supergod, mentioned before on these pages and now available in what the site owner admits may well be a shameful breach of Viz copyright.

Merry Christmas!

* See also Cow Christmas cracker jokes

Tom’s Excellent Javascript Snow

Behold: Tom’s Excellent Javascript Snow: unobtrusive and customisable javascript snow for web pages using no images! If you’re looking at this directly, rather than through an RSS aggregator, you should see it falling now. Unless, that is, you’re watching this on Dave, in which case it will be some time past Christmas and I might have taken the snow away again. However, it always snowing at Tom’s Excellent Javascript Snow page!

I’ve been meaning to write this since last year when my attempts were full of fail. The idea was to create simple unobstrusive javascript snow that could be added to any page and that didn’t require any images. I think Tom’s Excellent Javascript Snow fulfills these criteria and is therefore full of win. Furthermore, it is very customisable, so you can easily alter the amount, speed, and style of snow, and so forth. Incidentally, it uses the asterisk character (*) by default. There is in fact a Unicode Tight Trifoliate Snowflake character, but it is only available in a few fonts by the looks of it and I haven’t tried it. The script depends on the DOM and kind of uses CSS, but it is all defined through the Javascript: so many of the properties are different for individual snowflakes or change while the script is running, that it is not worth having a general style. It also means you only need one file to do everything.

To use it, copy tomsnow_v1.js to a directory on your web-server, and add the following code to the head of any pages on which you would like snow:

<script type=”text/javascript” src=”http://www.yourdomain.com/path/tomsnow_v1.js”></script>
<script type=”text/javascript”>
function init () {
snow();
}
window.onload=init;
</script>

I’m sure Stuart will tell me there’s a better way of doing it…

I know this works on Firefox 2 and Internet Explorer 6 on Windows as well as Firefox 3 on Linux.

In the unlikely event you do use this, do let me know for the sake of my own vanity. Any comments generally are welcome. I do have some ideas for version 2, maybe for next year, mostly around wind effects such as better horizontal drifting, prevailing winds, and gusts. Ideally, I would like to make the snow lay in some way, as in the snow at St Pancras (you might have to wait for it to kick in), but that is quite unlikely given the trouble I had with page heights as it was.