concord-consortium/lightweight-activities-plugin — pull request #2 by pjmorse (2012-09-07 23:58:59+00:00)
Title: Adds "theme" attribute to pages as string

After spending some time trying out integration with the themes-for-rails gem, I've come around to think that's not the right way of approaching this story. First, tying themes in to the Lightweight engine is problematic, because it's non-trivial to make the engine theme-aware. Second, conceptually it feels like the Theme as the gem understands it is too heavyweight a tool for this story.

This approach, on the other hand, is very lightweight: it just adds a custom class name to the div containing the page content. This allows a designer to provide custom CSS for different page layouts by targeting that container class, essentially namespacing their CSS. The question, which I suppose I'll need to put to Ethan, is whether this is *enough* or whether we also need to provide a means of adapting the HTML depending on the 'theme'.