65 lines
2.4 KiB
HTML
65 lines
2.4 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<title>{{.Title}}</title>
|
|
<link rel="stylesheet" href="/static/css/style.css" />
|
|
</head>
|
|
<body>
|
|
<header><a class="logo" href="/">💿 ISOSilo</a></header>
|
|
<main>
|
|
<nav class="bc">
|
|
{{range $i, $c := .Breadcrumbs}}<a href="{{$c.URL}}"
|
|
>{{$c.Name}}</a
|
|
>
|
|
{{if lt (add1 $i) (len $.Breadcrumbs)}}/{{end}} {{end}}
|
|
</nav>
|
|
<table class="tbl">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Size</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .Entries}}
|
|
<tr>
|
|
<td>
|
|
{{if .IsDir}}📁
|
|
<a
|
|
href="/browse/{{urlenc $.ISOName}}/{{urlenc .Path}}"
|
|
style="
|
|
color: var(--text);
|
|
text-decoration: none;
|
|
"
|
|
>{{.Name}}</a
|
|
>
|
|
{{else}}{{fileIcon .Name}}
|
|
<a
|
|
href="/file/{{urlenc $.ISOName}}/{{urlenc .Path}}"
|
|
target="_blank"
|
|
style="
|
|
color: var(--text);
|
|
text-decoration: none;
|
|
"
|
|
>{{.Name}}</a
|
|
>{{end}}
|
|
</td>
|
|
<td>
|
|
{{if .IsDir}}—{{else}}{{humanSize .Size}}{{end}}
|
|
</td>
|
|
<td>
|
|
{{if not .IsDir}}<a
|
|
href="/file/{{urlenc $.ISOName}}/{{urlenc .Path}}"
|
|
class="btn"
|
|
download
|
|
>Download</a
|
|
>{{end}}
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</main>
|
|
</body>
|
|
</html>
|