YUI App Theme

Tonight I pushed a new project to GitHub called yui-app-theme. It's a generic, skinnable layout designed for web applications — particularly admin areas — built using YUI Grids. In other words, it's a starting...

Tonight I pushed a new project to GitHub called yui-app-theme. It's a generic, skinnable layout designed for web applications — particularly admin areas — built using YUI Grids.

In other words, it's a starting point.

Usually when doing freelance work for clients, unless you're building on top of an existing CMS like WordPress or MiaCMS, you'll have to create an admin area for the client to login and manage their site. Or maybe you're building a bug tracker or some other web application. Whatever the situation, yui-app-theme provides a solid foundation to start your work.

It offers a tabbed layout with many of the common UI elements that web apps need. Content blocks, tabbed modules, one and two-column forms, error messages, etc. But most importantly it's built using YUI Grids so it's semantically structured, cross-browser, and easy to extend. You can radically alter the layout with just a few quick changes. Try clicking through the layout options on the demo page.

YUI App Theme preview

I've done my best to keep things logical and easy to use. Here's a quick example of how to use and extend the built-in content blocks.

A basic content block, or module, is created with the following markup


<div class="block">
    <div class="hd">
        <h2>Your Header Content</h2>
    </div>
    <div class="bd">
        <p>Your body content goes here.</p>
    </div>
</div>

You have a containing div with a class name of block surrounding two inner divs, which make up the head and body content of the block. In the browser you'll see

YUI App Theme content block preview

Content blocks resize to fit their surroundings. That means you can take the same markup used for a body content block and move it into a sidebar — the block will automatically shrink to fit the smaller space.

We can also extend the block to have a tabbed appearance. To do this, we just need to add an extra tabs class and define our tabs using a

NewerGoogle Voice DialerOlderPHP Wrapper for Yahoo! GeoPlanet