devroom.io/drafts/2007-08-27-blueprintcss-rails-generator.md

26 lines
1.4 KiB
Markdown
Raw Normal View History

2013-03-22 22:53:57 +00:00
---
title: "BlueprintCSS Rails Generator"
kind: article
slug: blueprintcss-rails-generator
created_at: 2007-08-27
tags:
- General
- RubyOnRails
- Features
---
<em><strong>This plugin is no longer available.</strong> Blueprint nowadays ships with a very good 'compress' script that allows you to generate all kinds of nice BluePrint layouts. Having a plugin to just copy some files seems a bit excessive. </em>
I think that, if you're a web developer, you've seen the <a href="http://code.google.com/p/blueprintcss/">BlueprintCSS</a> framework. BlueprintCSS offers quite a bit of CSS code that allows you to quickly and easily build a grid-based layout, using pure CSS.
That's, of course, all very nice, but you should be able to plug it in into your Rails app. And now you can!
Install my plugin:
<pre lang="bash">./script/plugin install http://svn.ariejan.net/plugins/blueprint</pre>
And then generate as many BlueprintCSS layouts as you'd like. To create a layout for your posts controller, simply run the following command:
<pre lang="bash">./script/generate blueprint posts</pre>
This will create a posts.rhtml template in app/views/layouts, and add the proper CSS and images to your application. That's all!
Note 1: You may remove a few lines of inline CSS from your layout to remove the supporting background images.
Note 2: Bugs and feature requests go into <a href="http://trac.ariejan.net/report/1">Trac</a>.