-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html.tmpl
55 lines (51 loc) · 1.35 KB
/
index.html.tmpl
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
<!DOCTYPE html>
<html>
<head>
<title>SideGate</title>
<style>
body {
line-height: 1.5;
font-family: "Helvetica", "Arial", sans-serif;
font-weight: 400;
font-size: 12pt;
color: #202020;
}
@media (min-width: 850px) {
body {
margin: 0 auto;
padding: 0.5em 1em;
}
}
h1 { font-size: 14pt; font-weight: 700; }
h2 { font-size: 12pt; font-weight: 700; font-family: monospace; }
th { font-weight: 700; text-align: left; }
td { padding-left: 5px; padding-right: 5px; font-family: monospace; }
a:link { color: #67ce2c; }
a:visited { color: #67ce2c; }
a:hover { color: #97ee4c; text-decoration: none; }
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<h1>Upload a File</h1>
<form action="/upload/{{.CurrentPath}}" method="POST" enctype="multipart/form-data">
<div><input type="file" name="file" multiple></div>
<div><input type="submit" value="Upload"></div>
</form>
<h2>{{range $folder := .PathParts}}{{$folder}} > {{end}}</h2>
<table>
{{range $item := .Items}}
<tr>
<td>{{$item.Size}}</td>
<td>
{{if $item.IsDir}}
<a href="/browse/{{$item.RelPath}}">{{$item.Name}}/</a>
{{else}}
<a href="/download/{{$item.RelPath}}">{{$item.Name}}</a>
{{end}}
</td>
</tr>
{{end}}
</table>
</body>
</html>