diff options
Diffstat (limited to 'templates/index.html')
-rw-r--r-- | templates/index.html | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/templates/index.html b/templates/index.html index 691de8e..409368b 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,42 +1,50 @@ <!DOCTYPE html> <html> <head> -<style> -table { - font-family: monospace; - border-collapse: collapse; -} - -td, th { - border: 0px solid #dddddd; - text-align: left; - padding: 2px; - padding-right: 1em; -} +<title>Index of {{ .Path }}</title> +<style type="text/css"> + body { background-color: #F5F5F5; } + h2#title { margin-bottom: 12px; } + a, a:active { text-decoration: none; color: blue; } + a:visited { color: #48468F; } + a:hover, a:focus { text-decoration: underline; color: red; } + table { margin-left: 12px; } + th, td { font: 90% monospace; text-align: left; } + th { font-weight: bold; padding-right: 14px; padding-bottom: 3px; } + td { padding-right: 14px; } + td.size, th#size { text-align: right; } + #dirlist { background-color: white; border-top: 1px solid #646464; border-bottom: 1px solid #646464; padding-top: 10px; padding-bottom: 14px; } + div#footer { font: 90% monospace; color: #787878; padding-top: 4px; } + a.sortheader { color: black; text-decoration: none; display: block; } + span.sortarrow { text-decoration: none; } </style> </head> <body> - <h2>Index of {{ .Path }}</h2> - -<table> +<div id="dirlist"> +<table summary="Directory Listing" cellpadding="0" cellspacing="0" class="sort"> <tr> <th>Name</th> <th>Last Modified</th> <th>Size</th> </tr> + <tr ><td><a href="../">Parent Directory</a></td><td>-</td><td>-</td></tr> {{- range $f := .Contents -}} <tr> <td><a href="{{- $f.Key -}}">{{- $f.Key -}}</a></td> - <td>{{- $f.LastModified -}}</td> - <td>{{- $f.Size -}}</td> + <td>{{- formatLastModified $f.LastModified -}}</td> + <td>{{- prettyByteSize $f.Size -}}</td> </tr> {{- end -}} {{- range $f := .CommonPrefixes -}} <tr> <td><a href="{{- $f.Prefix -}}">{{- $f.Prefix -}}</a></td> + <td>-</td> + <td>-</td> </tr> {{- end -}} </table> +</div> +<div id="footer"><a href="https://git.jordan.im/pipkin/">pipkin</a></div> </body> </html> |