Skip to content

Instantly share code, notes, and snippets.

Created April 16, 2014 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/10831180 to your computer and use it in GitHub Desktop.
Save anonymous/10831180 to your computer and use it in GitHub Desktop.
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