Commit 3f4f405119ebeb90c5736824c2f7e91c143740e7
1 parent
74e082e1
Exists in
master
and in
2 other branches
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,16 +15,21 @@ | ||
15 | {% endif %} | 15 | {% endif %} |
16 | 16 | ||
17 | 17 | ||
18 | +{% if news %} | ||
19 | + | ||
20 | + | ||
18 | 21 | ||
19 | 22 | ||
20 | <!-- Wrapper for slides --> | 23 | <!-- Wrapper for slides --> |
21 | <div id="myCarousel" class="carousel slide " data-ride="carousel"> | 24 | <div id="myCarousel" class="carousel slide " data-ride="carousel"> |
22 | <!-- Indicators --> | 25 | <!-- Indicators --> |
23 | <ol class="carousel-indicators"> | 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 | </ol> | 33 | </ol> |
29 | 34 | ||
30 | <div class="carousel-inner" role="listbox"> | 35 | <div class="carousel-inner" role="listbox"> |
@@ -52,6 +57,7 @@ | @@ -52,6 +57,7 @@ | ||
52 | </a> | 57 | </a> |
53 | </div> | 58 | </div> |
54 | 59 | ||
60 | +{% endif %} | ||
55 | 61 | ||
56 | 62 | ||
57 | 63 |