This commit is contained in:
Henrique Dias
2016-06-14 18:19:10 +01:00
parent 8393244e9d
commit e137f46169
7 changed files with 157 additions and 64 deletions

View File

@@ -1,7 +1,32 @@
{{ define "content" }}
<div class="listing">
<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>
<div class="container" id="listing">
{{- range .Items}}
<div class="item">
<div>
<a href="{{.URL}}">
{{- if .IsDir}}
<i class="material-icons">folder</i>
{{- else}}
<i class="material-icons">insert_drive_file</i>
{{- end}}
</a>
</div>
<div>
<span class="name">{{.Name}}</span>
{{- if .IsDir}}
<p data-order="-1">&mdash;</p>
{{- else}}
<p data-order="{{.Size}}">{{.HumanSize}}</p>
{{- end}}
<p class="hideable"><time datetime="{{.HumanModTime "2006-01-02T15:04:05Z"}}">{{.HumanModTime "01/02/2006 03:04:05 PM -07:00"}}</time></p>
</div>
</div>
{{- end}}
</div>
<!--
<table class="container" aria-describedby="summary">
<thead>
<tr>
@@ -57,6 +82,6 @@
</tr>
{{- end}}
</tbody>
</table>
</table> -->
</div>
{{ end }}