Theiling Online    Sitemap    Conlang Mailing List HQ   

[TECH] New Website Feature

From:Remi Villatel <maxilys@...>
Date:Monday, July 17, 2006, 16:58
Henrik Theiling wrote:

> I don't know about your browser, but my browser's internal mechanism > switches back to the default in such a case. This is what I meant: I > would not know how to implement this persistence in plain HTML.
That's easy and no so easy at the same time. The easy part: You just need to have 2 CSS files, one with funky colors and one only with black and white. The link to switch to B&W send you to a copy of the colorful page using the B&W CSS file. The hard part: You have to maintain 2 copies of your entire site and 2 CSS files. To ease the hard part: You make a copy of your whole site in a sub-directory "BW" --for example-- with the dedicated CSS file. This way, once you switch, you only navigate in the "BW" directory. (Your links must use relative paths.) And when you switch back to the colorful view, you just fall back to the regular site. Maintenance is easier, you just have to copy any modified colorful HTML file into "BW". The only really difficult part is the 2 CSS files that you must not forget to always edit together in order to keep them synchronized. The label of the switching link can be "Switch colorful/B&W view" so that it doesn't matter if it is on a colorful or B&W page. (Eventually, a tiny CSS trick can alter the label of the link on the fly.) Of course, it will only work if absolutely all the colors are handled through CSS and not through HTML tags. But before to apply such extreme measures, maybe a little time spent to re-think the color scheme of your site may be a good idea. Just my 0.02 Euro, -- ================== Remi Villatel maxilys_@_tele2.fr ==================

Reply

Henrik Theiling <theiling@...>TECH: New Website Feature