Sha256: e5eb1f3505db9a0e3b5318e1142ec356d38bacaa11b44054551fe63c533ba878

Contents?: true

Size: 1.39 KB

Versions: 12

Compression:

Stored size: 1.39 KB

Contents

{% if include.img.src or include.img.path %}
  {% assign srcset = null %}

  {% if include.img.srcset %}
    {% capture srcset %}{% for hash in include.img.srcset %}{% assign tmp = hash[1] %}{% include smart-url.txt url=tmp %} {{ hash[0] }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
  {% endif %}

  {% assign src = include.img.src | default:include.img.path %}
  {% capture attrs %}
    src="{% include smart-url.txt url=src %}"
    {% if include.class %}class="{{ include.class }}"{% endif %}
    {% if include.alt %}alt="{{ include.alt }}"{% endif %}
    {% if srcset %}srcset="{{ srcset | strip }}"{% endif %}
    {% if include.sizes %}sizes="{{ include.sizes }}"{% endif %}
  {% endcapture %}
{% else %}
  {% capture attrs %}
    src="{% include smart-url.txt url=include.img %}"
    {% if include.class %}class="{{ include.class }}"{% endif %}
    {% if include.alt %}alt="{{ include.alt }}"{% endif %}
  {% endcapture %}
{% endif %}

{% unless site.hydejack.no_img %}
  <hy-img
    {{ attrs }}
    {% if include.property %}property="{{ include.property }}"{% endif %}
    root-margin="512px"
  >
    <noscript><img data-ignore {{ attrs }}/></noscript>
    <span class="loading" slot="loading" hidden>
      <span class="icon-cog"></span>
    </span>
  </hy-img>
{% else %}
  <img
    {{ attrs }}
    {% if include.property %}property="{{ include.property }}"{% endif %}
  />
{% endunless %}

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
jekyll-theme-hydebetty-1.0.2 _includes/components/hy-img.html
jekyll-theme-hydebetty-1.0.1 _includes/components/hy-img.html
jekyll-theme-hydejack-8.5.2 _includes/components/hy-img.html
jekyll-theme-hydejack-8.5.1 _includes/components/hy-img.html
jekyll-theme-hydejack-8.5.0 _includes/components/hy-img.html
jekyll-theme-hydejack-8.4.0 _includes/components/hy-img.html
jekyll-theme-hydejack-8.3.2 _includes/components/hy-img.html
jekyll-theme-hydejack-8.3.1 _includes/components/hy-img.html
jekyll-theme-hydejack-8.3.0 _includes/components/hy-img.html
jekyll-theme-hydejack-8.2.0 _includes/components/hy-img.html
jekyll-theme-hydejack-8.1.1 _includes/components/hy-img.html
jekyll-theme-hydejack-8.1.0 _includes/components/hy-img.html