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.
People can then just include the javascript into their own sites, eg:
<script type="text/javascript" src="http://www.fedoraproject.org/fedora-counter.js"></script>
You can grab my demo of this from http://www.yacy-forum.org/test/fedora-counter.zip
On 23/10/2007, Mike McGrath mmcgrath@redhat.com wrote:
Rahul Sundaram wrote:
Ricky Zhou wrote:
Since about 20 minutes ago, the website is being generated from Genshi templates using a python script. This should make the site easier to maintain, and also enable cool features like our brand new automatically updating release counter :)
Looking at the image, it seems to be pregenerated. It would be better if we can provide a dynamically updated banner that others can copy into their blogs. Clicking on the banner could lead to the release schedule.
They are pregenerated. If someone wants to do the work I'm sure it would be easy for us to implement it. /me notes what Ubuntu did:
http://www.ubuntu.com/getubuntu/countdown
-Mike
-- Fedora-websites-list mailing list Fedora-websites-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-websites-list
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
Op woensdag 24-10-2007 om 16:22 uur [tijdzone -0400], schreef Ricky Zhou:
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?
Yeah definitely, this would be very cool! Just imaging surfing somewhere and being greeted by a werewolf :-)
Thanks, Ricky
Bart
Sounds good. Do we have a http://fedoraproject.org/images/counter/0.png file for when it's
What do you think? Should we put this up/start spreading it?
Thanks, Ricky
Sorry cut that message off prematurely.
I meant to finish by saying do we have a 0.png file for when the counter reaches 0 to say that F8 is now available or something similar?
On 25/10/2007, Andrew Myers am2605@gmail.com wrote:
Sounds good. Do we have a http://fedoraproject.org/images/counter/0.png file for when it's
What do you think? Should we put this up/start spreading it?
Thanks, Ricky
On Thu, Oct 25, 2007 at 07:48:19AM +1000, Andrew Myers wrote:
I meant to finish by saying do we have a 0.png file for when the counter reaches 0 to say that F8 is now available or something similar?
Ah, somebody mentioned this in #fedora-websites as well. Hopefully, we can have separate "0 days" and "F8 is here!" banners for those last 24 hours :)
Máirín- could you create a "Released" banner to show after the countdown is over?
Thanks, Ricky
On Thu, Oct 25, 2007 at 07:47:17AM +1000, Andrew Myers wrote:
Sounds good. Do we have a http://fedoraproject.org/images/counter/0.png file for when it's
I've put the counter script up at /js/release-counter.js for now (see http://ricky.fedorapeople.org/ for an example of it in action). Once we have an image for after Fedora has been released, I can add that case to the javascript.
The usage is something like: <script type="text/javascript" src="http://fedoraproject.org/js/release-counter.js"></script> <noscript>November 8th 2007 - Fedora 8 Release</noscript>
I haven't explicitly put up instructions for this anywhere else, but hopefully, people can start using it on their websites/blogs and such and spread it that way for now :)
Thanks, Ricky
websites@lists.fedoraproject.org