Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Image placeholder mixin for Jade using the placehold.it image service
//- Generate a placeholder image from placehold.it
//- ----------------------------------
//- Parameters:
//- width: image width in pixels
//- height: image height in pixels
//- text (optional): text inside image
//- ----------------------------------
//- Usage:
//- +image(200, 120, 'Example')
//- ----------------------------------
mixin image(width, height, text)
- text = text || "F.P.O."
img(src="http://placehold.it/#{width}x#{height}&text=#{text}", alt="")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment