diff options
Diffstat (limited to 'static/website/templates/index.html')
-rw-r--r-- | static/website/templates/index.html | 105 |
1 files changed, 64 insertions, 41 deletions
diff --git a/static/website/templates/index.html b/static/website/templates/index.html index ef840bc..cb5f3df 100644 --- a/static/website/templates/index.html +++ b/static/website/templates/index.html @@ -2,58 +2,75 @@ {% block content %} {% load count_tags %} <h4><u>Recent Questions</u></h4> +<table class="table table-striped table-bordered table-hover"> + <th> FOSS </th> + <th>TUTORIAL</th> + <th> MIN</th> + <th> SEC </th> + <th> QUESTION</th> + <th> DATE</th> + <th>VIEWS</th> + <th> USER</th> {% 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> + <tr> + <td> + <span href="#" class="category" data-toggle="tooltip" data-placement="top" title="{{ question.category}}"> + {{ question.category|truncatechars:15 }} </span> + <a class="pull-right" href="{% url 'website:filter' question.category %}?qid={{ question.id }}"> + <span class="glyphicon glyphicon-search"></span> + </a> + </td> - <span class="tutorial"> - <small> - <a href="{% url 'website:filter' question.category question.tutorial %}?qid={{ question.id }}"> - {{ question.tutorial}} - </a> - </small> + <td> + <span class="tutorial" data-toggle="tooltip" data-placement="top" title="{{ question.tutorial}}"> + {{ question.tutorial|truncatechars:15 }} </span> + <a class="pull-right" href="{% url 'website:filter' question.category question.tutorial %}?qid={{ question.id }}"> + <span class="glyphicon glyphicon-search"></span> + </a> + </td> - <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> + <td> + <span> + <a href="{% url 'website:filter' question.category question.tutorial question.minute_range %}?qid={{ question.id }}"> + {{ question.minute_range }} + </a> </span> + </td> - <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> + <td> + <span> + <a href="{% url 'website:filter' question.category question.tutorial question.minute_range question.second_range%}?qid={{ question.id }}"> + {{ question.second_range }} + </a> </span> - - <span class="meta"> - <small> - <i> - {{ question.date_created }} - </i> - </small> + </td> + + <td> + <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.title }}"> + <a href="{% url 'website:get_question' question.id %}">{{ question.title|truncatechars:45 }}</a> + </span> + </td> - <span class="user"> - {{ question.user }} - </span> + <td> + <span> + <i> + {{ question.date_created|date:"y-d-m" }} + </i> </span> - </div> <!-- /.question --> - {% endfor %} + </td> + <td> + {{ question.views}} + </td> + + <td> + {{ question.user }} + </td> + </tr> + {% endfor %} +</table> {% if total > 10 %} <ul class="pagination pull-right"> {% for i in total|get_range:"0,10" %} @@ -71,3 +88,9 @@ {% endif %} {% endblock %} + +{% block javascript %} +<script> + $('span').tooltip(); +</script> +{% endblock %} |