The Old Blog Archive, 2005-2009

A Belated Announcement in English: Yullio Layout Generator

(Announcement in Chinese here.)

hlb and I have created a Rails generator that churns out good-looking layouts (it’s Mollio :) ) for your controllers. Yullio Layout Generator (gem: layout_yullio_generator) is a layout generator that combines the flexibility of YUI Grids with Mollio CSS/HTML templates. Simply generate the layout with:

script/generate layout_yullio  [optional partial name]

And it places a copy of YUI Grids and Mollio CSS files in your public/ directory, instantly giving your views a great look.

This generator is a continuation of Mollio Layout Generator (gem: layout_mollio_generator). Here we combine Mollio’s good theme design with YUI Grids’ flexibility. It’s very easy to change the layout of your views. Just add the following lines in your controller:

  class MyController < ApplicationController
    yullio_page_width :doc2
    yullio_column_template :yui_t2

Here yullio_page_width is followed by YUI Grids page width styles, currently :doc, :doc2 and :doc3 are supported. Column templates follow the same naming rules. YUI calls them yui-t1 to -t7, here we replace the dash with the underline for obvious reasons. The two methods are implemented as a plug-in, which is of course copied for you by the generator. :)

Simply type “script/generator layout_yullio” for usage and description. We hope this generator will help you save time in creating layouts, further speeding up the prototyping stage of Rails app development.

Comments are closed.