abyss/templates/dirlist.html

88 lines
1.7 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>dir listing</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
}
h1 {
font-size: 24px;
margin-bottom: 10px;
}
header {
display: flex;
justify-content: center;
align-items: center;
}
.file-listing {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
.file-listing th,
.file-listing td {
border: 1px solid #ddd;
padding: 12px;
text-align: left;
}
.file-listing th {
background-color: #333;
color: white;
}
.file-listing tr:nth-child(even) {
background-color: #f9f9f9;
}
.file-listing tr:hover {
background-color: #f1f1f1;
}
.file-listing td a {
color: #0288d1;
text-decoration: none;
}
.file-listing td a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<header>
<h1>{{ .URL }}</h1>
</header>
<table class="file-listing">
<thead>
<tr>
<th>Name</th>
<th>Size</th>
</tr>
</thead>
<tbody>
{{range .Files}}
<tr>
<td>
<a href="{{.Path}}">{{.Name}}</a>
</td>
<td>{{.FormattedSize}}</td>
</tr>
{{end}}
</tbody>
</table>
</body>
</html>