Fwd: Website buildscript is live!
Ricky Zhou
ricky at fedoraproject.org
Wed Oct 24 20:22:42 UTC 2007
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"><img 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/websites/attachments/20071024/a20caa81/attachment.sig>
More information about the websites
mailing list