[S5-discuss] Alternate themes support in S5

ryan king ryan at theryanking.com
Thu Sep 14 13:06:35 CDT 2006


Sorry for the super-slow response. I recently switched hosting and  
some email got lost in the move.

On Aug 24, 2006, at 4:54 PM, Rafael Luque wrote:

> ...
>
>   * There is no clear separation between the core files that  
> control S5
> internals (JavaScript code and core stylesheet) and the files
> responsible of presentation issues. All these files are located under
> the same directory (ui/default).
>
>   * The installation of new themes requires either overwrite the  
> default
> stylesheets included with S5 tool (framing.css and pretty.css) or  
> create
> a directory containing all the S5 stuff, and not only the theme- 
> related
> styles.


I agree completely. I had done a bit of work on this, but haven't  
gotten too far. I'm open to your suggestions.

>   * Lack of support for multiple alternate themes associated with a
> presentation.

Honestly, this isn't a big deal to me. Let's try and get the simple  
case incorporated first.

> I have been refactoring a bit (only a couple of nights) around the S5
> (Eric Meyer codebase) to follow this way. My current version is still
> very early, but I have yet implemented the following changes:
>
>   * New directory layout:
>     - ui/core: for the JavaScript and core CSS files. Theme authors
> should not touch here.
>     - ui/themes: the directory to install new themes (the S5 default
> theme has been factored out to ui/themes/default).

This seems like a good division to me.

>   * I have introduced new configuration parameters to allow the user
> specify declaratively the theme or set of themes used by the
> presentation. For instance:
>
> <meta name="preferredTheme" content="orangesoft" />
> <meta name="preferredThemeTitle" content="Orange Soft's theme" />
> <meta name="alternateTheme" content="i18n" />
> <meta name="alternateThemeTitle" content="i18n theme" />

As mentioned above, I'd like to skip the alternate themes for now and  
just get the directory refactoring working.

> The code will use the configuration values to autogenerate the  
> following
> link elements (corresponding to preferred and alternate sytle sheets):
>
> <link rel="stylesheet" title="Orange Soft's theme"
> href="ui/themes/orangesoft/hook.css" type="text/css" media="screen" />
>
> <link rel="alternate stylesheet" title="i18n theme"
> href="ui/themes/i18n/hook.css" type="text/css" media="screen" />

Have you tested this with OperaShow?

> As you note, in this point I introduce a bit of convention to ease
> development. The theme name specified must match with the directory in
> which it is installed (under ui/themes), and all the themes must  
> contain
> a hook stylesheet with a well-known name (hook.css) to be  
> referenced by
> the tool. This file may either contain all the style rules or  
> import the
> actual theme styles.

Convention over congiguration = good.

>   * The code also autogenerates a style switcher mechanism (drop-drown
> menu) to allow the users switch between the themes declared in
> "presentation-time". The visibility of this switcher is controlled in
> the same way that navigation controls, i.e. "controlVis" configuration
> parameter and the 'c' accesskey.

Once again, unless anyone has strong objections, I'd like to skip  
putting this in the core for now.

> You can see this work-in-progress, very ugly version at an internal
> presentation about the use of S5 at
> http://www.orange-soft.com/training/s6/s6-intro.html (sorry, but at  
> the
> moment it is only in spanish). As you will note, I took the liberty to
> name this improvement S6 (Simple Standards-based Skinnable Slide Show
> System) :-)

Ah another S6 (my initial fork was called S6).

I'd like to get at least your basic directory refactoring into the  
core. If you don't have time to produce a patch against the mercurial  
repository [http://hg.s5project.org/], I can tackle it.

-ryan


More information about the S5-discuss mailing list