Name Last Update
..
lib Loading commit data...
tasks Loading commit data...
test Loading commit data...
COPYING Loading commit data...
README Loading commit data...
Rakefile Loading commit data...
TODO Loading commit data...
init.rb Loading commit data...
install.rb Loading commit data...
uninstall.rb Loading commit data...

README

= Design

Design is a Rails plugin that helps you to set different, custom designs for
your Rails application, or event letting your users do so.

== On what we mean by 'design'

By 'design', we mean a set of elements that are taken together to built
your application's visual identity. In this plugin, you'll work with the
following elements:

* *template* - definition of the how much boxes the visual identity will have, together with their sizes and positions.
* *theme* - CSS definition for fonts, colors, backgrounds and
* *icon_theme* - set of icons to be used as action buttons in your application.

== Declaring and using usign in controllers

(the settings names are fictional)

class MyController < ActionController::Base

box1 = Design::Box.new(:number => 1)
box1.blocks << Design::Block.new(:position => 1) do
"Welcome to my website!"
end

box2 = Design::Box.new(:number => 2)
box2.blocks << Design::MainBlock.new(:position => 1)

box3 = Design::Box.new(:number => 3)
box3.blocks << Design::Block.new(:position => 1) do
"This in my footer"
end

design :fixed => {
:template => 'header_main_footer',
:theme => 'green_fields',
:icon_theme => 'discrete',
:boxes => [ box1, box2, box3 ]
}
end

Design will then know that your design has three boxes, each one with a block inside it. To use Design as your layout generator, you just add something like this in aplicattion's layout:

The argument do +design_display_boxes()+ is the content you want to be the main
content. Almost always you'll want to pass +yield+ (the resulting content for
the current action) there, but you can pass anything you want.

== Controller subclassing and design

Designs are inherited through the inheritance tree. This way you can for
example declare the use of a design in ApplicationController and let the other
controllers abstract that fact that they are using design.

== Storing design information in ActiveRecord models: +acts_as_design+

You can also use ActiveRecord objects

== Suggestions, Bug reports and Patches

Send them to leandronunes@colivre.coop.br and terceiro@colivre.coop.br

== License

design - a web design composer and editor plugin for Rails
Copyright (C) 2007 Colivre

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see .

Please see the file +COPYING+ (distributed together with the plugin) for
the full terms of distribution.