Skip to content

Instantly share code, notes, and snippets.

@natebeaty
Last active June 20, 2018 18:42
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 natebeaty/0566b8e8b01eda97e7bfb35afa29a801 to your computer and use it in GitHub Desktop.
Save natebeaty/0566b8e8b01eda97e7bfb35afa29a801 to your computer and use it in GitHub Desktop.
nested navigation partial for Navigation structure in Craft 3
{% set headerImage = pageHeader.image.one() %}
{% set grayImage = craft.imager.transformImage(headerImage, {
width: 1000,
height: 1000,
mode: 'crop',
position: '20% 65%',
effects: { grayscale: true, gamma: 1.5 }
}) %}
<div class="page-header">
<div class="image-wrap">
<div class="image" style="background-image: url({{ grayImage ? grayImage.getUrl() : '' }});"></div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment