Skip to content

Instantly share code, notes, and snippets.

@thejimbirch
Created April 23, 2017 23:46
Show Gist options
  • Save thejimbirch/fb0485b82e82ae85c85c64ecdbe67e4f to your computer and use it in GitHub Desktop.
Save thejimbirch/fb0485b82e82ae85c85c64ecdbe67e4f to your computer and use it in GitHub Desktop.
Partial section of Xeno Hero Drupal 8 Paragraphs Template
{# Prints div with classes, & content w/o img/invert/overlay/parallax fields. #}
<div{{ attributes.addClass(classes).setAttribute('data-overlay', overlay_levels).setAttribute('data-speed', parallax_speeds) }}>
{% if content.xeno_background_image|render %}
<div class="paragraph--type--xeno-hero__image">
{{ content.xeno_background_image }}
</div>
{% endif %}
{{ content|without('xeno_background_image', 'xeno_invert', 'xeno_overlay', 'xeno_parallax') }}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment