On Tue, May 23, 2006 at 10:02:42AM +0200, Marcin Semeniuk wrote:
BTW, don't you think that using styles in *.c files is better than using
hardcoded
attributes (for example font names, colors, etc.) ?
I remember this being discussed a while ago. IIRC, at the time Sam wanted to
do it that way for compatibility with old browsers which didn't support CSS,
or supported it badly.
That was a couple of years ago I think, and these 'old' browsers can be
reclassified as 'ancient'. I think it would now be good to completely
separate the style from the content, a la www.csszengarden.com. This would
allow virtual domain owners to perform almost all the customisation they
could want just by adding a cascaded stylesheet, with very low risk that
things would break when sqwebmail was upgraded to a new version.
The main issue would be with the rounded corner boxes, but personally I
wouldn't mind if they were lost.
If this were to be reworked, there would also be an opportunity to separate
out HTML templates from language strings which I'd really like to see done.
This would give three parts:
(1) HTML templates, containing tags for strings
(2) Language files, mapping tags to strings in that language
(3) Style sheets [referred to from the HTML templates]
Doing it this way would allow you to replace or update templates without
losing the translations, and vice versa. At worst, if a new HTML template
contained a message tag which did not exist in an old translation file, then
that particular message would be displayed in English.
It also gives an opportunity to combine the 'login.html', 'invalid.html' and
'expired.html' templates into a single page, where the C code could replace
a metatag with one of three tags depending on the situation.
Regards,
Brian.