On Wed, Oct 24, 2007 at 08:56:05AM +1000, Andrew Myers wrote:
We could provide some javascript to select the correct image.
I'm borrowing from Ubuntu's code here, but I've attached an example of
how this could be done using Javascript.
The .js shoud be hosted on our site, and it would be even better if
rather than using the client date, it was served up dynamically to
just show the correct number.
Great idea! I modified the script a tiny bit to
match the logic that's
the website is using to generate the counter:
var today = new Date();
var release = new Date("November 8, 2007 14:00:00 UTC");
var millisBetweenDates = release - today;
var days = Math.ceil(millisBetweenDates/1000/60/60/24);
if (days < 0) days = 0;
document.write('<div id="banner"><a
href="http://fedoraproject.org/wiki/Releases/8/Schedule"><...
src="http://fedoraproject.org/images/counter/' + days + '.png"
alt="Fedora 8 Werewolf unleased in " + days + " days."
style="border: none;"></a></div>');
What do you think? Should we put this up/start spreading it?
Thanks,
Ricky