summaryrefslogtreecommitdiff
path: root/static/website/templates/index.html
blob: ef840bc9a06ba92eaf79f4ec1060b4cf356e4d58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{% extends 'website/templates/base.html' %}
{% block content %}
{% load count_tags %}
<h4><u>Recent Questions</u></h4>
    {% for question in questions %}
        <div class="question">
            <div class="title">
                <a href="{% url 'website:get_question' question.id %}">{{ question.title }}</a>
            </div> 
            <br>
            <span class="category">
                <small>
                    <a href="{% url 'website:filter' question.category %}?qid={{ question.id }}">
                        {{ question.category }}
                    </a>
                </small>
            </span>

            <span class="tutorial">
                <small>
                    <a href="{% url 'website:filter' question.category question.tutorial %}?qid={{ question.id }}">
                        {{ question.tutorial}}
                    </a>
                </small>
            </span>

            <span class="minute_range">
                <small>
                    <a href="{% url 'website:filter' question.category question.tutorial question.minute_range %}?qid={{ question.id }}">
                        {{ question.minute_range }} min
                    </a>
                </small>
            </span>

            <span class="second_range">
                <small>
                    <a href="{% url 'website:filter' question.category question.tutorial question.minute_range question.second_range%}?qid={{ question.id }}">
                        {{ question.second_range }} sec
                    </a>
                </small>
            </span>
            
            <span class="meta">
                <small>
                        <i>
                            {{ question.date_created }}
                        </i>
                </small>

                <span class="user">
                    {{ question.user }}
                </span>
            </span>
        </div> <!-- /.question -->
    {% endfor %}

    {% if total > 10 %}
        <ul class="pagination pull-right">
            {% for i in total|get_range:"0,10" %}
                <li>
                    <a href="{% url 'website:home' %}?marker={{ i }}">
                        {% if i == marker %}
                            <strong>{{ i|div:"10"|inc }}</strong>
                        {% else %}
                            {{ i|div:"10"|inc }}
                        {% endif %}
                    </a>
                </li>
            {% endfor %}
        </ul>
    {% endif %}

{% endblock %}