Sha256: 5cf52cd69e272b6444604de15bd8491e77a72ca7e564e786fd2b136d84475958

Contents?: true

Size: 1.98 KB

Versions: 15

Compression:

Stored size: 1.98 KB

Contents

<div class="row">
  <div class="col hero-slider__slider">
  {% for slide in page.slides %}
  {% assign url_first_char = slide.url | slice: 0 %}
    {% if forloop.first == true %}
    <div>
      <a
        {% if slide.url contains "https://" or slide.url contains "http://" %}href="{{ slide.url }}"
        {% elsif url_first_char == '.' or url_first_char == '/' or slide.url == '#' %}href="{{ slide.url }}"
        {% else %}href="{{ page.baseurl }}{{ slide.url }}"{%- endif -%}
        {% if slide.new_tab == true %} target="_blank" rel="noopener noreferrer"{%- endif -%}>
        <img src="{{page.baseurl}}{{slide.image}}"
          class="img-fluid hero-slider__slider--slide-img {% if slide.white_background %} hero-slider__slide-img--border{% endif %}"
          alt="{{slide.alt-text}}" />
      </a>
      {% if slide.text and slide.text != '' %}
      <div class="hero-slider__slider--heading-container text-center">
        <h3 class="hero-slider__slider--slide-heading">{{slide.text}}</h3>
      </div>
      {% endif %}
    </div>
    {%- else -%}
    <div>
      <a
        {% if slide.url contains "https://" or slide.url contains "http://" %}href="{{ slide.url }}"
        {% elsif url_first_char == "." or url_first_char == "/" or slide.url == '#' %}href="{{ slide.url }}"
        {% else %}href="{{ page.baseurl }}{{ slide.url }}"{%- endif -%}
        {% if slide.new_tab == true %} target="_blank" rel="noopener noreferrer"{%- endif -%}>
        <img src="{{ page.baseurl }}assets/img/placeholder_16to9.jpg"
          data-src="{{page.baseurl}}{{slide.image}}"
          class="img-fluid hero-slider__slider--slide-img {% if slide.white_background %} hero-slider__slide-img--border{% endif %}"
          alt="{{slide.alt-text}}" />
      </a>
      {% if slide.text and slide.text != "" %}<div class="hero-slider__slider--heading-container text-center">
      <h3 class="hero-slider__slider--slide-heading">{{slide.text}}</h3>
      </div>{% endif %}
    </div>
    {% endif %}
  {%- endfor -%}
  </div>
</div>

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
kcc-gem-theme-core-0.0.3 _includes/hero-slider.html
kcc-gem-theme-core-0.0.2 _includes/hero-slider.html
kcc-gem-theme-core-0.0.1 _includes/hero-slider.html
kcc-gem-theme-2.14.1 _includes/hero-slider.html
kcc-gem-theme-2.14.0 _includes/hero-slider.html
kcc-gem-theme-2.13.0 _includes/hero-slider.html
kcc-gem-theme-2.12.2 _includes/hero-slider.html
kcc-gem-theme-2.12.1 _includes/hero-slider.html
kcc-gem-theme-2.12.0 _includes/hero-slider.html
kcc-gem-theme-2.11.1 _includes/hero-slider.html
kcc-gem-theme-2.11.0 _includes/hero-slider.html
kcc-gem-theme-2.10.0 _includes/hero-slider.html
kcc-gem-theme-2.9.1 _includes/hero-slider.html
kcc-gem-theme-2.9.0 _includes/hero-slider.html
kcc-gem-theme-2.8.6 _includes/hero-slider.html