Every repository with this icon (
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | Tue Apr 14 05:23:09 -0700 2009 | |
| |
README.rdoc | Tue Apr 14 18:21:33 -0700 2009 | |
| |
Rakefile | Tue Apr 14 05:23:09 -0700 2009 | |
| |
app/ | Fri Nov 13 09:44:34 -0800 2009 | |
| |
config/ | Tue Apr 14 05:23:09 -0700 2009 | |
| |
generators/ | Tue Apr 14 18:21:33 -0700 2009 | |
| |
init.rb | Tue Apr 14 05:23:09 -0700 2009 | |
| |
test/ | Tue Apr 14 05:23:09 -0700 2009 |
Showoff
The showoff plugin gives you a simple way to throw arbitrary HTML mockups into your appliction. You can use static HTML, ERB, or any other templating language (such as HAML) that your application supports.
How do I install it?
script/plugin install git://github.com/adamlogic/showoff.git script/generate showoff
Are there any dependencies?
Yes, this plugin only works with Rails 2.3, thanks to the support for Rails Engines, which basically lets you embed a "mini app" inside of your main app.
How do I use it?
Just throw your mockups into app/views/mockups, then navigate to /mockups in your app. Just like any other Rails view, you can use partials, helpers, etc. If you want to use a layout other than your application default, tack it on as an additional file extension (example.html.erb.alternate).
Can I see an example?
Once you’ve run the generator, navigate to /mockups in your app to see some examples.
What’s the point of this?
- Avoid duplicating headers, footers, and other layout cruft by using the same layouts that the rest of your app uses.
- By using the same CSS and JS files as the rest of your app, you avoid the pain of merging these things in later.
- Use partials to keep your mockups more maintainable.
- Because you have access to Ruby (as opposed to static HTML mockups), you can take advantage of looping to avoid duplication.
- If you have a library such as Faker installed, you can use it to generate fake data and Lorum Ipsum text, rather than pasting it in.
- Easily use your templating language of choice when building mockups (I use HAML).
- Because your mockups can follow the same style and conventions as application code, showoff can drastically reduce the time it takes to wire up a mockup.
Copyright © 2009 Adam McCrea, released under the MIT license







