-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
54 lines (48 loc) · 877 Bytes
/
index.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
<html>
<head>
<style>
body {
font-size: larger;
margin-left: auto;
margin-right: auto;
width: 60%;
}
table {
width: 100%
}
table tr {
font-size: large;
line-height: 24px;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
</style>
</head>
<body>
<h1>Index of {{.ParentUrl}}</h1>
<hr />
<table>
{{if ne .ParentUrl "/"}}
<tr>
<td><a href="../">../</a></td>
<td></td>
<td></td>
</tr>
{{end}}
{{range .Files}}
<tr>
<td><a href="{{$.ParentUrl}}{{.Name}}{{if .IsDir}}/{{end}}">{{.Name}}{{if .IsDir}}/{{end}}</a></td>
<td>{{.ModTime.Format "2006-01-02 15:03:02"}}</td>
<td>{{.Size}}</td>
</tr>
{{else}}
<tr>
<td colspan="3">Empty directory</td>
</tr>
{{end}}
</table>
<hr />
<center>Powered by <a href="https://github.com/notsobad/go-fileshare">go-fileshare</a></center>
</body>
</html>