0.02
No commit activity in last 3 years
No release in over 3 years
Easy image placeholders via Placehold.it
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.2.9
 Project Readme

Placeholder

Placeholder is a simple little gem that inserts image placeholders into your design's wireframe. It uses www.placehold.it's awesome service.

Requirements

Nada.

How To Install

Install the gem: [sudo] gem install placeholder

If you're using Rails, add config.gem 'placeholder' to your config/environment.rb.

If you're using Sinatra, add require 'placeholder' to your main application file.

Usage

Placeholder requires a size as the first argument and can accept :text, :fg_color and :bg_color arguments.

Examples

This will place a 200x300 image placeholder into your page with the text "Whoa Now". The default text is the image size.

= Placeholder.new("200x300", :text => "Whoa Now")

If you just need a square image, simply do:

= Placeholder.new(100)

You can also pass CSS classes and an ID if you'd like:

= Placeholder.new(80, :id => "gravatar", :class => "active admin")

About the Author

My name is Matt Darby. I’m a Partner and co-founder of Protected Method LLC and hold a Master’s Degree in Computer Science from Franklin University in sunny Columbus, OH.