datatables update
This commit is contained in:
@@ -1,28 +1,38 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs-3.3.6/jq-2.2.3/dt-1.10.12/datatables.css"/>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="https://cdn.datatables.net/v/bs-3.3.6/jq-2.2.3/dt-1.10.12/datatables.js"></script>
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<script>
|
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs-3.3.7/jq-3.2.1/jq-3.2.1/dt-1.10.16/r-2.2.0/datatables.min.css"/>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="https://cdn.datatables.net/v/bs-3.3.7/jq-3.2.1/jq-3.2.1/dt-1.10.16/r-2.2.0/datatables.min.js"></script>
|
||||||
|
<script>
|
||||||
|
|
||||||
$(document).ready(function()
|
$(document).ready(function()
|
||||||
{
|
{
|
||||||
$('#table').DataTable({
|
$('#table').DataTable({
|
||||||
"order": [[{{sortby}}, 'desc']],
|
order: [[{{sortby}}, 'desc']],
|
||||||
"paging": false
|
paging: false,
|
||||||
|
responsive: true,
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<nav class="navbar navbar-default">
|
<nav class="navbar navbar-default">
|
||||||
<div class="container-fluid">
|
<div class="container">
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#collbar" aria-expanded="false">
|
||||||
|
<span class="sr-only">Toggle navigation</span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
<a class="navbar-brand" href="#">HNLearn</a>
|
<a class="navbar-brand" href="#">HNLearn</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="collapse navbar-collapse">
|
<div class="collapse navbar-collapse" id="collbar">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
<li><a href="/">Latest > 0</a></li>
|
<li><a href="/">Latest > 0</a></li>
|
||||||
<li><a href="/?all=true">Latest with < 0</a></li>
|
<li><a href="/?all=true">Latest with < 0</a></li>
|
||||||
@@ -32,21 +42,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<table id="table" class="table">
|
<table id="table" class="table dt-responsive">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Title</th>
|
<th class="all">Title</th>
|
||||||
<th>Date</th>
|
<th class="desktop">Date</th>
|
||||||
<th>Score</th>
|
<th class="desktop">Score</th>
|
||||||
<th>Up/Down</th>
|
<th class="desktop">Up/Down</th>
|
||||||
<th>Comments</th>
|
<th class="desktop">Comments</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
%for x in items:
|
%for x in items:
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{x.url}}">{{x.name}}</a>
|
<a href="{{x.url}}">{{x.name}}</a>
|
||||||
</td>
|
</td>
|
||||||
<td>{{x.date.strftime("%Y-%m-%d %H:%M")}}</td>
|
<td>{{x.date.strftime("%Y-%m-%d %H:%M")}}</td>
|
||||||
<td>{{"{0:.4g}".format(x.rating)}}</td>
|
<td>{{"{0:.4g}".format(x.rating)}}</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user