Sha256: 0a34e7d89b35182bd6c725fbbecf61aa4d3476dfc06d5299942ed95fa7e24b5e

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

{% if include.image %}
  {% assign image = include.image %}
{% else %}
  {% assign item  = site[include.collection] | where: 'pid', include.pid | first %}
  {% assign image = item.full %}
{% endif %}

{%- capture style -%}
  background-image: url('{{ image | absolute_url }}');
  background-position: 0% {{ include.y | default: '15%' }};
  {% if include.clickable %}
  cursor: pointer;
  {% endif %}
  {% if include.height %}
  height: {{ include.height }} !important;
  {% endif %}
{%- endcapture -%}

{%- capture onclick -%}
{% if include.clickable %}
  onclick="window.location='{{ item.url | absolute_url }}'; return false;"
{% endif %}
{%- endcapture -%}

<div class='wax-parallax full-width {% if page.banner %}top-banner{% else %}inline-parallax{% endif %}'>
  <div class='parallax-image' style="{{ style | strip }}" {{ onclick | strip }}></div>

  {% if item.label %}
  <div class='parallax-caption'>
    <div class='wax-inline-container'>
      Above: <a href='{{ item.url | absolute_url }}'>{{ item.label }}</a>
    </div>
  </div>
  {% endif %}
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wax_theme-1.1.0 _includes/parallax_image.html