Skip to content

Instantly share code, notes, and snippets.

/gist:10831180
Created Apr 16, 2014

Embed
What would you like to do?
lib.logo = IMAGE
lib.logo {
file = IMAGEPATH
altText = ALTTEXT
titleText < lib.logo.altText
params = class="img-responsive"
file.width = 220
layoutKey = srcset
layout {
srcset {
element = <img src="###SRC###" srcset="###SOURCECOLLECTION###" ###PARAMS### ###ALTPARAMS### ###SELFCLOSINGTAGSLASH###>
source = |*|###SRC### ###SRCSETCANDIDATE###,|*|###SRC### ###SRCSETCANDIDATE###
}
}
sourceCollection {
small {
width = 300
srcsetCandidate = 800w
mediaQuery = (min-width: 480px)
dataKey = small
}
smallHires {
if.directReturn = 1
width = 320
pixelDensity = 2
srcsetCandidate = 800w 2x
mediaQuery = (min-device-width: 800px) AND (foobar)
dataKey = smallHires
pictureFoo = bar
}
big {
width = 364
mediaQuery = (min-width: 1600px)
dataKey = small
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.