Last active
December 14, 2015 20:08
-
-
Save lajlev/5141282 to your computer and use it in GitHub Desktop.
Holder.js helper for middleman. Holder.js works offline.
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
# Require holder.js https://github.com/imsky/holder | |
def holder(width, height) | |
color = ("%06x" % rand(0..0xffffff)) | |
return '<img data-src="holder.js/' + width.to_s + 'x' + height.to_s + '/auto/#' + color.to_s + ':#' + color.to_s + '">' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment