Skip to content

Instantly share code, notes, and snippets.

@ridgehkr
Created March 27, 2014 17:49
Show Gist options
  • Save ridgehkr/9813711 to your computer and use it in GitHub Desktop.
Save ridgehkr/9813711 to your computer and use it in GitHub Desktop.
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