Thomas Klausner wrote:

Hi!

On Tue, Jan 01, 2002 at 01:26:23AM +0800, Stas Bekman wrote:

I suppose that we can use a conditional require() for the style sheet in the <head> section and serve a different CSS for older NS. That's possible right? (I didn't do html for a long time)

Oh is the site going to be dynamic?  Different tempaltes for old clients is
one way to go.

Nope, it's going to be static. You can decide which CSS to fetch at run time, via require(). I think this has something to do with JS if I'm not mistaken. So you can check the agent and fetch a proper for this agent CSS file. I suppose this doesn't contradict with the fact that we don't want to use JS for usability. This JS should work behind the scenes and if it's disable or not available the default CSS should be brought in. I'll leave again to the experts to comment on whether it's going to work.

IMO there are two ways of doing this (I did the seconde once..)

1) Put some JS in the HTML to check the browser version and have the JS
generate the "require style sheet" part.

2) Generate the CSS dynamically. That is, require something like
/cgi-bin/css.pl and have that script return the corresponding style sheet
for the requesting client (with Content-type: text/css). The problem here is
that each request triggers a CGI process. But it works even if JS is disabled.

Maybe one way to get the best result would be to first load a CSS file the
normal way. Afterwards have some JS check the browser type and load another
CSS file according to the browser type.


That's exactly what I've meant. You always have the <noscript></noscript> or whatever it is (I don't remember) used for doing things for browsers with no JS (or disabled).

We definitely don't want to pick CSS dynamically.


So if someone with an old browser, but JS enabled views the page, s/he first
gets the "standard" CSS file and afterwards the JS-generated browser
specific CSS. As the C stands for Cascading, the later loaded CSS file will
override the "standard" file, and thus those styles will be applied.

If someone with a new browser (i.e. standard compliant) but JS turned off
requests a page, s/he gets only the default standard CSS file, which the
browser can render.

So we don't force users with new browsers to use JS to get the best view of
the mod_perl site, AND we can make a nice-looking page for old browser with
JS enabled. Old Browsers without JS (or lynx, etc) just get the very basic
layout (like http://hank.org/images/style6.png )

But I'd prefer to do this fine-tuning /after/ all current issues (i.e.
prev/next and download widget) have been dealt with.

That's fine, there is no hurry, we just need to remember which things to deal with.


Once you decide on more or less stable layout (templates wise), please send me the tmpl dir and I'll put it under modperl-docs cvs repository so we can all work with the same source. I've ported most of the content already, after adding the tmpl dir we can do some alpha previews for people.

_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to