Created
March 27, 2014 17:49
-
-
Save ridgehkr/9813711 to your computer and use it in GitHub Desktop.
Image placeholder mixin for Jade using the placehold.it image service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//- 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