-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
157 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<!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> |