On a resize event, it would check the viewport width and height, and, depending on what range it falls in, it would hide or collapse elements accordingly, gracefully degrading the layout. A technique that I dubbed "intelligent switching" was used to determine which range the width and height falls in, elegantly. To me, that means not resorting to a chain of
if statements. I'll talk about intelligent switching in another article, but for now, below is the list of ranges and what happens when the viewport dimensions fall in that range.
|When Width Is Below (px)||This Happens|
|875||Right sidebar disappears.|
|700||Service links disappear.|
|550||Pine trunk on the right collapses. The navigation and breadcrumb bars disappear.|
|When Height Is Below (px)||This Happens|
|500||Breadcrumb bar disappears. Navigation bar shortens and floats to top right. Header region collapses.|
When the viewport dimensions move out of range the changes reverse. Flayout is working right now, live on this site, so try it out and see for yourself how it works. This has been tested and known to work under Firefox, Opera and Safari, and it isn't working under Internet Explorer, yet. I have yet to debug this under Internet Explorer. Someday, I'll do it.
Because we've all seen AJAX abused too many times, Chyrp is made to use it only where it works good. For example, creating a new post uses AJAX, because it's already definite where it's going to end up (the content, with all the other posts [unless you made it a draft, in which case it goes in to "Your Drafts" and tells you so]). However, for creating a page it uses regular old form submitting. This is because pages are meant to be their own section of the website. There's no point in having it fade in to the content or do anything fancy, because you'll end up going to its own page anyway.
John Resig (author of jQuery who recently joined Mozilla Corp) wrote about Firefox 3 will have native support for
document.getElementsByClassName(). This is what almost all web developers want; almost all Ajax libraries implement this.
A Slashdot article, titled "AJAX May Be Considered Harmful", claims: