diff options
author | Jayaram Pai | 2014-04-19 18:12:57 +0530 |
---|---|---|
committer | Jayaram Pai | 2014-04-19 18:12:57 +0530 |
commit | 1f0b55a3e1500660945f0702aa00c90a23ca4d95 (patch) | |
tree | 5ae3d6615149261115dbf3ebc5155db5267d8fe7 /static/website/templates/index.html | |
parent | bf734e04b25ca97c897f431af8ac9966279337f5 (diff) | |
parent | 2fbf3ecf6cae63691380ec8cc9df2c4beff29dae (diff) | |
download | FOSSEE-Forum-1f0b55a3e1500660945f0702aa00c90a23ca4d95.tar.gz FOSSEE-Forum-1f0b55a3e1500660945f0702aa00c90a23ca4d95.tar.bz2 FOSSEE-Forum-1f0b55a3e1500660945f0702aa00c90a23ca4d95.zip |
fixed merge conflict
Diffstat (limited to 'static/website/templates/index.html')
-rw-r--r-- | static/website/templates/index.html | 252 |
1 files changed, 159 insertions, 93 deletions
diff --git a/static/website/templates/index.html b/static/website/templates/index.html index 5046c13..4162e42 100644 --- a/static/website/templates/index.html +++ b/static/website/templates/index.html @@ -1,106 +1,172 @@ {% extends 'website/templates/base.html' %} {% load static %} -{% block content %} {% load count_tags %} -<h4><u>Recent Questions</u></h4> -<table class="table 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> Replies</th> - <th> User</th> - {% for question in questions %} - <tr> - <td> - <span href="#" class="category" data-toggle="tooltip" data-placement="top" title="{{ question.category}}"> - {{ question.category|truncatechars:12 }} - </span> - <a class="pull-right" href="{% url 'website:filter' question.category %}?qid={{ question.id }}"> - <span class="glyphicon glyphicon-search"></span> - </a> - </td> - - <td> - <span class="tutorial" data-toggle="tooltip" data-placement="top" title="{{ question.tutorial}}"> - {{ question.tutorial|truncatechars:12 }} - </span> - <a class="pull-right" href="{% url 'website:filter' question.category question.tutorial %}?qid={{ question.id }}"> - <span class="glyphicon glyphicon-search"></span> - </a> - </td> - - <td> - <span> - <a href="{% url 'website:filter' question.category question.tutorial question.minute_range %}?qid={{ question.id }}"> - {{ question.minute_range }} - </a> - </span> - </td> - - <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> - </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:40 }}</a> - </span> - </td> - - <td> - <span> - <i> - {{ question.date_created|date:"d-m-y" }} - </i> - </span> - </td> - - <td> - {{ question.views}} - </td> - - <td> - {{ question.reply_set.count }} - </td> - - <td> - <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.user }}"> - {{ question.user|truncatechars:10 }} - </span> - </td> - </tr> - {% endfor %} +{% block content %} + <div id="carousel-container"> + <div class="row"> + <div class="col-lg-12"> + <div class="carousel"> + {% for category in categories %} + <div class="item"> + <div class="thumb"> + <img data-lazy="{% static "website/images/" %}{{ category }}.jpg" height="75px" width="99px"> + </div> + <div class="descp"> + <a class="btn btn-block btn-default btn-sm vs" href="{% url 'website:filter' category %}">{{ category }}</a> + </div> + </div> <!-- /.item --> + {% endfor %} + </div> <!-- /.carousel --> + </div> <!-- /.col --> + </div> <!-- /.row --> + </div> -</table> - {% if total > 25 %} - <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 %} + <div id="filter-container"> + <div class="row"> + <form class ="" id="filter-form" action="" role="form"> + <div class="col-lg-6"> + <h3>Filter questions . . .</h3> + <div class="row"> + <div class="form-group col-lg-10"> + <select id="filter-select" class="form-control"> + <option value="-1">Select a FOSS category</option> + {% for category in categories %} + <option value="{{ category }}">{{ category }}</option> + {% endfor %} + </select> + </div> <!-- /.form-group, .col --> + <div class="form-group col-lg-2"> + <input class="btn btn-primary btn-block" type="submit" value="Go"> + </div> <!-- /.form-group, .col --> + </div> + </div> <!-- /.col --> + </form> + <div class="col-lg-6"> + <div class="row"> + <div class="col-lg-6"> + <h3 align="center"><strong>{% total_question_count %}</strong></h3> + <h3 align="center">Questions</h3> + </div> + <div class="col-lg-6"> + <h3 align="center"><strong>{% total_answer_count %}</strong></h3> + <h3 align="center">Answers</h3> + </div> + </div> + </div> + </div> <!-- /.row --> + </div> <!-- /#filter-container --> + <br> + <div class="panel panel-default"> + <div class="panel-heading"> + Recent Questions + </div> + <div class="panel-body"> + <table class="table 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> Answers</th> + <th> User</th> + {% for question in questions %} + <tr> + <td> + <span href="#" class="category" data-toggle="tooltip" data-placement="top" title="{{ question.category}}"> + {{ question.category|truncatechars:12 }} + </span> + <a class="pull-right" href="{% url 'website:filter' question.category %}?qid={{ question.id }}"> + <span class="glyphicon glyphicon-search"></span> + </a> + </td> + + <td> + <span class="tutorial" data-toggle="tooltip" data-placement="top" title="{{ question.tutorial}}"> + {{ question.tutorial|truncatechars:12 }} + </span> + <a class="pull-right" href="{% url 'website:filter' question.category question.tutorial %}?qid={{ question.id }}"> + <span class="glyphicon glyphicon-search"></span> + </a> + </td> + + <td> + <span> + <a href="{% url 'website:filter' question.category question.tutorial question.minute_range %}?qid={{ question.id }}"> + {{ question.minute_range }} + </a> + </span> + </td> + + <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> + </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:40 }}</a> + </span> + </td> + + <td> + <span> + <i> + {{ question.date_created|date:"d-m-y" }} + </i> + </span> + </td> + + <td> + {{ question.views}} + </td> + + <td> + {{ question.answer_set.count }} + </td> + + <td> + <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.user }}"> + {{ question.user|truncatechars:10 }} + </span> + </td> + </tr> + {% endfor %} + + </table> + </div> <!-- /.panel-body --> + </div> <!-- /.panel --> {% endblock %} {% block javascript %} <script> - $('span').tooltip(); + $(document).ready(function(){ + $('.carousel').slick({ + lazyLoad: 'ondemand', + dots: false, + touchMove: false, + draggable: false, + slidesToShow: 8, + slidesToScroll: 3, + speed: 500, + {# autoplay: true, #} + autoplaySpeed: 1000, + }); + + $("#filter-form").submit(function(e) { + var category = $("#filter-select").val(); + if(category != -1) { + window.location = "/filter/" + category; + } + e.preventDefault(); + }); + }); </script> <script src="{% static 'website/js/nice-bar.js' %}"></script> {% endblock %} |