Moving here discussion generated from comments http://drupal.org/node/254165#comment-837867 and http://drupal.org/node/254165#comment-837960.
Moving here discussion generated from comments http://drupal.org/node/254165#comment-837867 and http://drupal.org/node/254165#comment-837960.
Comments
Comment #1
flevour commentedThe main problem about theming here is giving freedom while retaining functionality.
My idea is a bit hairy from a markup standpoint, but I think it gives a lot of flexibility. I'll sketch an example here for outputting date("h:m:S"):
Use worldclock_# to identify the html code about country #. Use classes wc_% where % is a lettercode to surround output.
Use jQuery selectors (i.e. $("#worldclock_1 .wc_h"), that is select element with class .wc_h within element with id #worldclock_1) to update each field.
This way you can style each lettercode output in a different way if you want.
Comment #2
flevour commentedI have made a simple example based on the above markup. You can see a demo here: http://dev.flevour.net/worldclock_jquery/wc.html (I am showing 2 clocks, even if they show the same time; this is just because the template is ready for further development with different timezones).
I basically merged a function from your script (GenerateTimeString()) with the JClock plugin, then added the functionality I am proposing.
I can't elaborate more on this approach now, as I am a bit tired, but I am looking forward to any critics/comments.
Comment #3
flevour commentedComment #4
flevour commented