blob: c9ae4c474537a48bc2fbc2311f9fa406e8c721e7 (
plain)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
template = """
<html>
<head>
<title>${path}</title>
<style type="text/css">
body {
font-family:Arial, Verdana;
margin:0px;
padding:0px;
}
table.dirlist {
margin:0 auto;
font-size:13px;
color:#666;
min-width:960px;
}
table.dirlist tr.r1 {
background-color:#f4f4f4;
}
table.dirlist td {
padding:6px 12px;
margin:0px;
}
table.dirlist td a.link-dir {
font-weight:bold;
}
table.dirlist td a {
text-decoration:none;
}
table.dirlist td a:hover {
text-decoration:underline;
}
table.dirlist tr {
padding:4px;
margin:0px;
}
table.dirlist tr:hover {
background-color:#e9e9e9;
}
</style>
</head>
<body>
<div class="dirlist-container">
<table class="dirlist">
<thead>
<tr>
<th>File/Directory</th>
<th>Size</th>
<th>Created Date</th>
</tr>
</thead>
<tbody>
% for i, entry in enumerate(dirlist):
<tr class="${entry['type']} r${i%2}">
<td><a class="link-${entry['type']}" href="${ entry['path'] }">${entry['name']}</a></td>
<td>${entry['size']}</td>
<td>${entry['created_time']}</td>
</tr>
% endfor
</tbody>
</table>
</div>
</body>
</html>
"""
|