Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update carousel.html #128

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 87 additions & 25 deletions _includes/elements/carousel.html
Original file line number Diff line number Diff line change
@@ -1,40 +1,102 @@
{%- assign images = carousel_images | strip | newline_to_br | split: '<br />' -%}

<div id="carouselExampleIndicators" class="carousel slide" data-ride="false">

{%- assign images = carousel_images | strip | newline_to_br | split: '<br />' -%}
{%- assign carousel_id = include.carousel_id -%}
{%- if include.class -%}
<div id="carouselExampleIndicators{{ carousel_id }}" class="carousel slide" data-ride="false">
<ol class="carousel-indicators">
{% for image in images %}
{%- if forloop.first -%}
<li data-target="#carouselExampleIndicators" data-slide-to="{{forloop.index0}}" class="active"></li>
{%- else -%}
<li data-target="#carouselExampleIndicators" data-slide-to="{{forloop.index0}}"></li>
{%- endif -%}
{% endfor %}
{% for image in images %} {%- if forloop.first -%}
<li
data-target="#carouselExampleIndicators{{ carousel_id }}"
data-slide-to="{{forloop.index0}}"
class="active"
></li>
{%- else -%}
<li data-target="#carouselExampleIndicators{{ carousel_id }}" data-slide-to="{{forloop.index0}}"></li>
{%- endif -%} {% endfor %}
</ol>

<div class="carousel-inner">
{% for image in images %}
{%- if forloop.first -%}
<div class="carousel-item active">
<img src="{{ image }}" class="d-block w-100">
</div>
{%- else -%}
<div class="carousel-item">
<img src="{{ image }}" class="d-block w-100">
</div>
{%- endif -%}
{% endfor %}
{% for image in images %} {%- if forloop.first -%}
<div class="carousel-item active" width="90%">
<img src="{{ image }}" class="{{include.class}}" width="90%"/>
</div>
{%- else -%}
<div class="carousel-item" width="90%">
<img src="{{ image }}" class="{{include.class}}" width="90%"/>
</div>
{%- endif -%} {% endfor %}
</div>

<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<a
class="carousel-control-prev"
href="#carouselExampleIndicators{{ carousel_id }}"
role="button"
data-slide="prev"
>

<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>

<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<a
class="carousel-control-next"
href="#carouselExampleIndicators{{ carousel_id }}"
role="button"
data-slide="next"
>
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>

</div>

{%- else -%}
<div id="carouselExampleIndicators{{ carousel_id }}" class="carousel slide" data-ride="false">
<ol class="carousel-indicators" width="90%">
{% for image in images %} {%- if forloop.first -%}
<li
data-target="#carouselExampleIndicators{{ carousel_id }}"
data-slide-to="{{forloop.index0}}"
class="active"
></li>
{%- else -%}
<li data-target="#carouselExampleIndicators{{ carousel_id }}" data-slide-to="{{forloop.index0}}"></li>
{%- endif -%} {% endfor %}
</ol>

<div class="carousel-inner" width="90%">
{% for image in images %} {%- if forloop.first -%}
<div class="carousel-item active" width="90%">
<img src="{{ image }}" class="d-block w-90" width="90%" width="90%"/>
</div>
{%- else -%}
<div class="carousel-item" width="90%">
<img src="{{ image }}" class="d-block w-90" width="90%" width="90%"/>
</div>
{%- endif -%} {% endfor %}
</div>

<a
class="carousel-control-prev"
href="#carouselExampleIndicators{{ carousel_id }}"
role="button"
data-slide="prev"
>
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>

<a
class="carousel-control-next"
href="#carouselExampleIndicators{{ carousel_id }}"
role="button"
data-slide="next"
>
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
{%- endif -%}
<style>
.height-350 {
height: 350px !important;
}
</style>