forked from athas/EggsML
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.html
55 lines (52 loc) · 1.55 KB
/
template.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<html>
<head>
<title>Brainfuck præsenterer Brainfuck's EggsML</title>
<link rel="stylesheet" href="styles.css" type="text/css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script>
<script type="text/javascript" src="/js/jquery.tablesorter.min.js"></script>
<script type="text/javascript">
$.tablesorter.addParser({
id: "latest",
is: function(s) {
return false;
},
format: function(s) {
var day;
if(s == "I dag")
day = 0;
else if(s == "I går")
day = 1;
else
day = s.split(" ", 1)[0];
return day;
},
type: "numeric"
});
$.tablesorter.addParser({
id: "localNumeric",
is: function(s) {
return false;
},
format: function(s) {
return s.replace(",", ".");
},
type: "numeric"
});
$(document).ready(function()
{
var sorterdef = { headers : { 1: {sorter:"localNumeric"}
, 2: {sorter:"localNumeric"}
, 3: {sorter:"localNumeric"}
, 4: {sorter:"localNumeric"}
, 5: {sorter:"latest"} }}
$("#eggsdata").tablesorter(sorterdef);
$("#alumne").tablesorter(sorterdef);
$("#eggspurchases").tablesorter();
}
);
</script>
</head>
<body>
{{CONTENT}}
</body>
</html>