Skip to content

Commit

Permalink
Merge pull request #4 from tart2000/new_carousel
Browse files Browse the repository at this point in the history
carousel can now accept any number of images
  • Loading branch information
Oliver Stapleton committed Nov 21, 2014
2 parents 6ff8008 + 11696e7 commit c9cf7fe
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions _includes/carousel.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
{% for img in page.carousel %}
<li data-target="#carousel-example-generic" data-slide-to="{{ forloop.index0 }}"
{% if forloop.index0 == 0 %}
class="active"
{% endif %}>
</li>
{% endfor %}
</ol>

<!-- Wrapper for slides -->
Expand All @@ -20,5 +24,5 @@
</div>
{% endfor %}
</div>
</div><! --/Carousel -->
</div>
</div> <!--/Carousel -->
</div>

0 comments on commit c9cf7fe

Please sign in to comment.