isosilo/templates/browse.html

65 lines
2.4 KiB
HTML
Raw Permalink Normal View History

2026-04-20 11:56:24 +02:00
<!doctype html>
<html>
2026-04-20 11:56:24 +02:00
<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>