Looks like it's time to make our forum more easily skinnable. Do you have any suggestions?
A few things to look at:
edit: sorry used some made up terminology. by "native" I mean the "core" elements. For example I would consider question title a "core" element, but any layout elements as belonging to local customization - any containers that package say question title, tool links - non-mandatory. That way we could clearly mark which elements are key, and which are up to the skin designer.
answered 2010-05-06 15:51:41 -0500Pekka
how should site administrator change/customize skin?
I think the current way skins are customized is fine. The template system is easy to understand, and Django's cascading mechanism (i.e. if a file isn't there in the custom template, load it from the default directory) is great. I personally am also fine with the skin being defined in a config file. Once there's an admin tool, it's of course also nice to have it there as a drop-down menu, but it's not really a priority IMO.
what naming conventions to choose for id and class names
I think it pretty much doesn't matter as long as they are consistent, and written down in the Wiki.
I would propose to make a choice between Camel Case and underlines:
there are arguments for and against both of them. Using underlines and small caps prevents case errors that are often easy to overlook.
Other than that, I think class names should be as short as possible, and be defined by function (and not by properties).
One thing that should be decided early on is whether we're going to use multiple classes. Using more than two classes breaks in IE6.
Multiple classes would be a great tool. Consider
<div class="InfoBox LeftMenu Warning">
it would be possible to split CSS rules that generally apply to Info boxes, rules that apply to Info boxes in the left hand menu, and Info boxes that are warnings into three reusable classes.
We are going to want to support IE6 in the standard template, though, I presume. Sadly, it still has a considerable market share.
what elements to pick as "application native" and which - leave them as part of local customization?
Can you make an example of an element that could be part of the local customization? I'm not sure I understand this entirely.
This is a very good question. If I understand Django's templating system right, it would be possible to have a
common.js in the default template. As long as people don't overwrite that with a local
/default/media/js/askbot_core/jquery.js /default/media/js/askbot_core/org.askbot.editor.js /default/media/js/askbot_core/org.askbot.utils.js /default/media/js/askbot_core/...
people looking to customize their template will be told not to create a
askbot_core directory completely (at their own risk).
Would this be a workable idea? I'm still a total newbie in all matters Django and Python.
One other thing we should be working on is using semantically correct elements everywhere. There are a few page titles here and there that are
divs that really should be
Regarding cascaded skins - they are not part of django per se, I've built that system for the forum.
Its weak point is that it makes possibility for two kinds of skins - the "full" ones that have all the files and "lazy" ones that have only some files. They are not the same because you cannot inherit from the "lazy" template in the same way (and it's actually impossible), yet they are stored the same way and may confuse people that they are equivalent in their function.
Secondly we have only one full skin - but I imagine that there might be several - e.g. with different layouts. If we want to support more than one base skin then we need two variables to define skin: name of full base skin and name of "lazy" one.
I thought that it would also be nice to upload media images through the admin UI (something that less tech savvy users will probably like) - so that is asking for another layer for media resolution on top of "lazy"->"full": "uploaded"->"lazy"->"full". However for the templates we'd leave "lazy"->"full". Or "uploaded"->"full" if lazy skin is not defined.
Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.create your Q&A site
Asked: 2010-05-06 13:42:33 -0500
Seen: 558 times
Last updated: May 06 '10