summaryrefslogtreecommitdiff
path: root/static/website/templates/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'static/website/templates/index.html')
-rw-r--r--static/website/templates/index.html155
1 files changed, 82 insertions, 73 deletions
diff --git a/static/website/templates/index.html b/static/website/templates/index.html
index 5149099..1915a77 100644
--- a/static/website/templates/index.html
+++ b/static/website/templates/index.html
@@ -7,6 +7,17 @@
{% block content %}
<div style="margin-left: 450px;" >
+
+<script>
+
+ $(document).ready(function()
+ {
+ $("#myTable").tablesorter();
+ }
+ );
+
+ </script>
+
<script>
(function() {
var cx = '011342992297670206849:dfzecvqmvgc';
@@ -18,9 +29,9 @@
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
-</script>
-<gcse:search></gcse:search>
-</div>
+ </script>
+ <gcse:search></gcse:search>
+ </div>
<style>
@@ -32,22 +43,19 @@
}
-
-input.gsc-search-button, input.gsc-search-button:hover, input.gsc-search-button:focus {
-
- background-image: url("http://www.google.com/uds/css/v2/search_box_icon.png") !important;
- background-position: 50% 50%;
- background-repeat: no-repeat;
- height: 28px !important;
- width: 60px
-
- filter: none;
-
-}
+ input.gsc-search-button, input.gsc-search-button:hover, input.gsc-search-button:focus {
+
+ background-image: url("http://www.google.com/uds/css/v2/search_box_icon.png") !important;
+ background-position: 50% 50%;
+ background-repeat: no-repeat;
+ height: 28px !important;
+ width: 60px
+ filter: none;
+
+ }
</style>
-
<div id="carousel-container">
<div class="carousel">
@@ -69,7 +77,7 @@ input.gsc-search-button, input.gsc-search-button:hover, input.gsc-search-button:
{% latest_question category %}
- <a class="btn btn-xs btn-block btn-success" href="{% url 'website:new_question' %}?category={{ category.id|urlencode }}">Ask new question</a>
+ <a class="btn btn-xs btn-block btn-success" href="{% url 'website:new_question' %}?category={{ category.id|urlencode }}">Ask new question</a>
</div>
</div>
</div>
@@ -93,10 +101,7 @@ input.gsc-search-button, input.gsc-search-button:hover, input.gsc-search-button:
<h3 style="font-size: 18px" align="center"><strong>{% total_question_count %}</strong></h3>
<h3 style="font-size: 18px; margin-top: 1px;" align="center" text-color="#7395d9" >Questions</h3>
</div>
- <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6" style="width: 100px;margin-left:40px; margin-right:40px">
- <h3 style="font-size: 18px" align="center"><strong>{% total_answer_count %}</strong></h3>
- <h3 style="font-size: 18px; margin-top: 1px;" align="center">Answers</h3>
- </div>
+
</div>
</div>
</div> <!-- /.row -->
@@ -108,58 +113,62 @@ input.gsc-search-button, input.gsc-search-button:hover, input.gsc-search-button:
Recent questions
</div>
<div class="panel-body">
- <table class="table table-bordered table-hover">
- <th> FOSS </th>
-
- <th> Question </th>
- <th> Date</th>
- <th> Views</th>
- <th> Answers</th>
- <th> User</th>
- {% for question in questions %}
- <tr>
- <td>
- <span class="category" data-toggle="tooltip" data-placement="top" title="{{ question.category}}">
-
- <a class="pull-left" href="{% url 'website:filter' question.category|lower %}?qid={{ question.id }}">
- {{ question.category|truncatechars:12 }}
-
- </a>
- </span>
- </td>
-
-
- <td>
- <span class="question" data-toggle="tooltip" data-placement="top" title="{{ question.title }}">
- <a href="{% url 'website:get_question' question.id %}{% prettify question.title %}">{{ 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>
+ <table id="myTable" class="tablesorter-blue">
+ <thead>
+ <tr>
+ <th>FOSS</th>
+ <th>Question </th>
+ <th>Date</th>
+ <th>Views</th>
+ <th>Answers</th>
+ <th>User</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for question in questions %}
+ <tr>
+ <td>
+ <span class="category" data-toggle="tooltip" data-placement="top" title="{{ question.category}}">
+
+ <a class="pull-left" href="{% url 'website:filter' question.category|lower %}?qid={{ question.id }}">
+ {{ question.category|truncatechars:12 }}
+
+ </a>
+ </span>
+ </td>
+
+
+ <td>
+ <span class="question" data-toggle="tooltip" data-placement="top" title="{{ question.title }}">
+ <a href="{% url 'website:get_question' question.id %}{% prettify question.title %}">{{ 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 %}
+ </tbody>
+ </table>
</div> <!-- /.panel-body -->
</div> <!-- /.panel -->
{% endblock %}