moved html and css out to seperate files.

This commit is contained in:
visionmercer 2026-04-15 09:08:14 +02:00
commit f9cfd3fc3b
5 changed files with 152 additions and 126 deletions

27
templates/browse.html Normal file
View file

@ -0,0 +1,27 @@
<!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="dl-btn" download>Download</a>{{end}}</td>
</tr>
{{end}}
</tbody>
</table>
</main>
</body>
</html>