2016-06-10 21:18:44 +00:00
|
|
|
{{ define "content" }}
|
|
|
|
<div class="listing">
|
2016-06-14 15:13:38 +00:00
|
|
|
<div>There are {{.NumDirs}}</b> director{{if eq 1 .NumDirs}}y{{else}}ies{{end}} and {{.NumFiles}}</b> file{{if ne 1 .NumFiles}}s{{end}} in here.</div>
|
|
|
|
|
2016-06-11 13:32:50 +00:00
|
|
|
<table class="container" aria-describedby="summary">
|
2016-06-10 21:18:44 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>
|
|
|
|
{{- if and (eq .Sort "name") (ne .Order "desc")}}
|
|
|
|
<a href="?sort=name&order=desc{{if ne 0 .ItemsLimitedTo}}&limit={{.ItemsLimitedTo}}{{end}}">Name <svg width="1em" height=".4em" version="1.1" viewBox="0 0 12.922194 6.0358899"><use xlink:href="#up-arrow"></use></svg></a>
|
|
|
|
{{- else if and (eq .Sort "name") (ne .Order "asc")}}
|
|
|
|
<a href="?sort=name&order=asc{{if ne 0 .ItemsLimitedTo}}&limit={{.ItemsLimitedTo}}{{end}}">Name <svg width="1em" height=".4em" version="1.1" viewBox="0 0 12.922194 6.0358899"><use xlink:href="#down-arrow"></use></svg></a>
|
|
|
|
{{- else}}
|
|
|
|
<a href="?sort=name&order=asc{{if ne 0 .ItemsLimitedTo}}&limit={{.ItemsLimitedTo}}{{end}}">Name</a>
|
|
|
|
{{- end}}
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
{{- if and (eq .Sort "size") (ne .Order "desc")}}
|
|
|
|
<a href="?sort=size&order=desc{{if ne 0 .ItemsLimitedTo}}&limit={{.ItemsLimitedTo}}{{end}}">Size <svg width="1em" height=".4em" version="1.1" viewBox="0 0 12.922194 6.0358899"><use xlink:href="#up-arrow"></use></svg></a>
|
|
|
|
{{- else if and (eq .Sort "size") (ne .Order "asc")}}
|
|
|
|
<a href="?sort=size&order=asc{{if ne 0 .ItemsLimitedTo}}&limit={{.ItemsLimitedTo}}{{end}}">Size <svg width="1em" height=".4em" version="1.1" viewBox="0 0 12.922194 6.0358899"><use xlink:href="#down-arrow"></use></svg></a>
|
|
|
|
{{- else}}
|
|
|
|
<a href="?sort=size&order=asc{{if ne 0 .ItemsLimitedTo}}&limit={{.ItemsLimitedTo}}{{end}}">Size</a>
|
|
|
|
{{- end}}
|
|
|
|
</th>
|
|
|
|
<th class="hideable">
|
|
|
|
{{- if and (eq .Sort "time") (ne .Order "desc")}}
|
|
|
|
<a href="?sort=time&order=desc{{if ne 0 .ItemsLimitedTo}}&limit={{.ItemsLimitedTo}}{{end}}">Modified <svg width="1em" height=".4em" version="1.1" viewBox="0 0 12.922194 6.0358899"><use xlink:href="#up-arrow"></use></svg></a>
|
|
|
|
{{- else if and (eq .Sort "time") (ne .Order "asc")}}
|
|
|
|
<a href="?sort=time&order=asc{{if ne 0 .ItemsLimitedTo}}&limit={{.ItemsLimitedTo}}{{end}}">Modified <svg width="1em" height=".4em" version="1.1" viewBox="0 0 12.922194 6.0358899"><use xlink:href="#down-arrow"></use></svg></a>
|
|
|
|
{{- else}}
|
|
|
|
<a href="?sort=time&order=asc{{if ne 0 .ItemsLimitedTo}}&limit={{.ItemsLimitedTo}}{{end}}">Modified</a>
|
|
|
|
{{- end}}
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2016-06-11 22:01:24 +00:00
|
|
|
|
2016-06-10 21:18:44 +00:00
|
|
|
{{- range .Items}}
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<a href="{{.URL}}">
|
|
|
|
{{- if .IsDir}}
|
2016-06-14 15:13:38 +00:00
|
|
|
<i class="material-icons">folder</i>
|
2016-06-10 21:18:44 +00:00
|
|
|
{{- else}}
|
2016-06-14 15:13:38 +00:00
|
|
|
<i class="material-icons">insert_drive_file</i>
|
2016-06-10 21:18:44 +00:00
|
|
|
{{- end}}
|
|
|
|
<span class="name">{{.Name}}</span>
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
{{- if .IsDir}}
|
|
|
|
<td data-order="-1">—</td>
|
|
|
|
{{- else}}
|
|
|
|
<td data-order="{{.Size}}">{{.HumanSize}}</td>
|
|
|
|
{{- end}}
|
|
|
|
<td class="hideable"><time datetime="{{.HumanModTime "2006-01-02T15:04:05Z"}}">{{.HumanModTime "01/02/2006 03:04:05 PM -07:00"}}</time></td>
|
|
|
|
</tr>
|
|
|
|
{{- end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|