Commit 02428a7f2c4e6cb8a8a03a5651cb362e29e6fd17

Authored by Gustavo
1 parent 3646ec61

Rendering news images in the carroussel

Showing 1 changed file with 9 additions and 2 deletions   Show diff stats
subjects/templates/subjects/initial.html
... ... @@ -28,7 +28,14 @@
28 28 <li data-target="#myCarousel" data-slide-to="3"></li>
29 29 </ol>
30 30  
31   - <div class="carousel-inner" role="listbox">
  31 +<div class="carousel-inner" role="listbox">
  32 + {% for new in news %}
  33 + <div class="item" style="text-align:center">
  34 + <h3> {{new.title}}</h3>
  35 + <span><a href="{% url 'news:view' new.slug %}"> <img src="{{ new.image.url }}" alt="Image"> </a></span>
  36 + </div>
  37 + {% endfor %}
  38 +
32 39 <div class="item active">
33 40 <h2 class=" my-subjects-title"><b><i>{% trans "Most popular keywords" %}</i></b></h2>
34 41 <div id="" class="col-md-12">
... ... @@ -50,7 +57,7 @@
50 57 </div>
51 58 </div>
52 59  
53   - </div>
  60 +</div>
54 61  
55 62 <!-- Left and right controls -->
56 63 <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
... ...