Added tablesorter so the server list can be sorted.
This commit is contained in:
parent
915905c4be
commit
b6a7f28429
@ -13,10 +13,6 @@ body {
|
|||||||
font-family: "Helvetica Neue", Helvetica, Arial,sans-serif;
|
font-family: "Helvetica Neue", Helvetica, Arial,sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Header and navbar **********************************************************/
|
/* Header and navbar **********************************************************/
|
||||||
#navbar {
|
#navbar {
|
||||||
background-color: #333;
|
background-color: #333;
|
||||||
@ -102,3 +98,25 @@ body {
|
|||||||
color: #444;
|
color: #444;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Utils **********************************************************************/
|
||||||
|
.right {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tablesorter-head ::before {
|
||||||
|
font-family: "Glyphicons Halflings";
|
||||||
|
content: "−";
|
||||||
|
margin-right: 5px;
|
||||||
|
font-size: small;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tablesorter-asc ::before {
|
||||||
|
font-family: "Glyphicons Halflings";
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
|
||||||
|
.tablesorter-desc ::before {
|
||||||
|
font-family: "Glyphicons Halflings";
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
4
src/static/js/jquery.tablesorter.min.js
vendored
Normal file
4
src/static/js/jquery.tablesorter.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,15 +1,16 @@
|
|||||||
{% extends "base_site.html" %}
|
{% extends "base_site.html" %}
|
||||||
|
{% load staticfiles %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
Index
|
Index
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<table class="table table-hover">
|
<table id="servers" class="table table-hover tablesorter">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Players</th>
|
<th><span>Players</span></th>
|
||||||
<th>Server</th>
|
<th><span>Server</span></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -30,4 +31,17 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="{% static 'js/jquery.min.js' %}"></script>
|
||||||
|
<script type="text/javascript" src="{% static 'js/jquery.tablesorter.min.js' %}"></script>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
var settings = {
|
||||||
|
cssAsc: 'tablesorter-asc',
|
||||||
|
cssDesc: 'tablesorter-desc',
|
||||||
|
cssHeader: 'tablesorter-head',
|
||||||
|
};
|
||||||
|
$("#servers").tablesorter(settings);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user