Commit 3f4f405119ebeb90c5736824c2f7e91c143740e7

Authored by Gustavo
1 parent 74e082e1

Modified home template to adjust news

Showing 1 changed file with 10 additions and 4 deletions   Show diff stats
subjects/templates/subjects/home.html
... ... @@ -15,16 +15,21 @@
15 15 {% endif %}
16 16  
17 17  
  18 +{% if news %}
  19 +
  20 +
18 21  
19 22  
20 23 <!-- Wrapper for slides -->
21 24 <div id="myCarousel" class="carousel slide " data-ride="carousel">
22 25 <!-- Indicators -->
23 26 <ol class="carousel-indicators">
24   - <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
25   - <li data-target="#myCarousel" data-slide-to="1"></li>
26   - <li data-target="#myCarousel" data-slide-to="2"></li>
27   - <li data-target="#myCarousel" data-slide-to="3"></li>
  27 + <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
  28 + {% for new in news %}
  29 + {% if forloop.counter != news.count %}
  30 + <li data-target="#myCarousel" data-slide-to="{{forloop.counter}}"></li>
  31 + {% endif %}
  32 + {% endfor %}
28 33 </ol>
29 34  
30 35 <div class="carousel-inner" role="listbox">
... ... @@ -52,6 +57,7 @@
52 57 </a>
53 58 </div>
54 59  
  60 +{% endif %}
55 61  
56 62  
57 63  
... ...