December 15, 2007
YUI Pages plugin 0.1.0 released
Tonight I’m releasing version 0.1.0 of my new YUI Pages Rails plugin. Here’s a quick example of what it can do (from the README):
<% yui_page :width => YUIPages::PAGE_750, :secondary => YUIPages::RIGHT_180 do %>
<% header do %>
Page title
<% end %>
<% body do %>
<% main do %>
<% grid :columns => YUIPages::GRID_75_25 do %>
<% unit do %>
Content for the 75% width first column.
<% end %>
<% unit do %>
Content for the 25% width second column.
<% end %>
<% end %>
<% end %>
<% secondary do %>
Content for the 180px right sidebar.
<% end %>
<% end %>
<% footer do %>
Footer links here
<% end %>
<% end %>
This light (less than 90 lines of code) plugin saves me from having to remember or care about the YUI Grids CSS IDs and classes, and handles preparing correct markup regardless of my grid arrangement.
No more looking up that “yui-t3” means a 300px sidebar on the left or forgetting to class the first unit in a grid with “first” because I moved things around in my layout file. A small victory, but a victory nonetheless.
SVN is at http://svn.eastmedia.net/public/plugins/yui_pages/. Check out the full README.