# ActsAsLayoutable ## Usage ### Install sudo gem install acts-as-layoutable ### Usage Layoutable do # defines valid areas areas :top, :bottom, :left, :right, :header, :footer, :center grids do full :top, :bottom, :left, :right, :center left :top, :bottom, :right portfolio :top, :bottom, :center blog do right :text, :social end end widgets do text do title :string, :label => "Sample text" body :text end social do links :as => Link end end end That creates cells, areas, and layouts. ### Api Layoutable.widgets #=> [text, social] Layoutable.areas #=> [:top, :bottom, :left, :right, :header, :footer, :center] Layoutable.layouts #=> [:full, :left, :portfolio] layout = Layout.first layout.widgets layout.top_widgets layout.bottom_widgets - Each `Post` has a different `Layout` via `clone`. - New layouts cannot be constructed outside of this dsl. Only the order and presence of cells within areas can be customized. - `area` is the "context" for the join of Layout to Widget.