Skip to content

Instantly share code, notes, and snippets.

@andrewfairlie
Created March 7, 2016 14:03
Show Gist options
  • Select an option

  • Save andrewfairlie/5104df1ec6ef2ab90637 to your computer and use it in GitHub Desktop.

Select an option

Save andrewfairlie/5104df1ec6ef2ab90637 to your computer and use it in GitHub Desktop.
Gallery
{% if block|length>1 %}
{
"role": "gallery",
"layout": "galleryLayout",
"behavior": {
"type": "parallax",
"factor": 0.8
},
"items": [
{% for image in block %}
{
"URL": "bundle://{{ image|url_encode }}"
}{% if not loop.last %},{% endif %}
{% endfor %}
]
},
{% elseif block|length == 1 %}
{
"role": "photo",
"layout": "imageLayout",
"behavior": {
"type": "parallax",
"factor": 0.8
},
"fillMode": "cover",
"URL": "bundle://{{ block[0]|url_encode }}"
},
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment