Comments

flevour’s picture

The 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"):

<div id="worldclock_1">
  <span class="wc_h">10</span>:<span class="wc_m">10</span>:<span class="wc_S">10</span>
</div>
<div id="worldclock_2">
  <span class="wc_h">10</span>:<span class="wc_m">10</span>:<span class="wc_S">10</span>
</div>

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.

flevour’s picture

I 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.

flevour’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
flevour’s picture

Title: Module/Theme interaction » Keep theming separate from module code