Commit 3b03041a26b5a1c939b00f82bd2b4463f97ae23e
1 parent
d29e8e6f
Exists in
master
and in
2 other branches
New home subject template
Showing
1 changed file
with
84 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,84 @@ |
1 | +{% extends "categories/home.html" %} | |
2 | + | |
3 | +{% load static pagination i18n %} | |
4 | + | |
5 | +{% block content %} | |
6 | + {% if messages %} | |
7 | + {% for message in messages %} | |
8 | + <div class="alert alert-{{ message.tags }} alert-dismissible" role="alert"> | |
9 | + <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
10 | + <span aria-hidden="true">×</span> | |
11 | + </button> | |
12 | + <p>{{ message }}</p> | |
13 | + </div> | |
14 | + {% endfor %} | |
15 | + {% endif %} | |
16 | + | |
17 | + | |
18 | + | |
19 | + | |
20 | + <!-- Wrapper for slides --> | |
21 | + <div id="myCarousel" class="carousel slide " data-ride="carousel"> | |
22 | + <!-- Indicators --> | |
23 | + <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> | |
28 | + </ol> | |
29 | + | |
30 | +<div class="carousel-inner" role="listbox"> | |
31 | + {% for new in news %} | |
32 | + {% if forloop.first %} | |
33 | + <div class="item active" style="text-align:center"> | |
34 | + <span><a href="{% url 'news:view' new.slug %}"> <img src="{{ new.image.url }}" alt="Image"> </a></span> | |
35 | + </div> | |
36 | + {% else %} | |
37 | + <div class="item" style="text-align:center"> | |
38 | + <span><a href="{% url 'news:view' new.slug %}"> <img src="{{ new.image.url }}" alt="Image"> </a></span> | |
39 | + </div> | |
40 | + {% endif%} | |
41 | + {% endfor %} | |
42 | + | |
43 | +</div> | |
44 | + | |
45 | + <!-- Left and right controls --> | |
46 | + <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev"> | |
47 | + <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> | |
48 | + <span class="sr-only">Previous</span> | |
49 | + </a> | |
50 | + <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next"> | |
51 | + <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> | |
52 | + <span class="sr-only">Next</span> | |
53 | + </a> | |
54 | +</div> | |
55 | + | |
56 | + | |
57 | + | |
58 | + | |
59 | + | |
60 | + | |
61 | + <div class="col-md-12 cards-content"> | |
62 | + <h2 class=" my-subjects-title"><b><i>{% trans "My Subjects" %} ({{ total_subs }})</i></b></h2> | |
63 | + | |
64 | + {% if subjects|length > 0 %} | |
65 | + <div class="panel-group" id="subject-accordion" role="tablist" aria-multiselectable="true"> | |
66 | + {% for subject in subjects %} | |
67 | + {% include "subjects/subject_card.html" with accordion_id="subject-accordion" %} | |
68 | + {% endfor %} | |
69 | + | |
70 | + {% pagination request paginator page_obj %} | |
71 | + </div> | |
72 | + {% else %} | |
73 | + <div class="text-center no-subjects"> | |
74 | + <i class="fa fa-graduation-cap"></i> | |
75 | + <h4>{% trans 'You still do not posses any subject in our platform' %}</h4> | |
76 | + </div> | |
77 | + {% endif %} | |
78 | + </div> | |
79 | + | |
80 | + <div id="modal_subject"></div> | |
81 | + | |
82 | + <script type="text/javascript" src="{% static 'subjects/js/modal_subject.js' %}"></script> | |
83 | + <script type="text/javascript" src="{% static 'js/category.js' %}"></script> | |
84 | +{% endblock content %} | ... | ... |