]> Sergey Matveev's repositories - godlighty.git/blob - dirlist.tmpl
Use mtime instead of ctime
[godlighty.git] / dirlist.tmpl
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Index of {{.Dir}}</title>
5 </head>
6 <body>
7 {{with .Readme}}
8 <pre>
9 {{. -}}
10 </pre>
11 {{end}}
12 <table border=1>
13 <tr><th>&nbsp;</th><th>Name</th><th>Mtime</th><th>Size</th><th>Type</th></tr>
14 {{$Dir := .Dir}}{{$Root := .Root}}{{range .Files}}<tr>
15   <td {{if .Symlink}}rowspan="2"{{end}}>{{.Idx}}</td>
16   <td><a href="{{$Root}}{{$Dir}}{{.Name}}{{if .IsDir}}/{{end -}}"><tt>
17     {{- .Name}}{{if .IsDir}}/{{end}}</tt></a></td>
18   <td><tt>{{.ModTime}}</tt></td>
19   <td>{{.Size}}</td>
20   <td><tt>{{if .IsDir}}dir{{else}}{{.Type}}{{end}}</tt></td>
21 </tr>{{if .Symlink}}<tr><td colspan="4"><tt>-&gt; {{.Symlink}}</tt></td></tr>{{end}}
22 {{end -}}
23 </table>
24 </body>
25 </html>