{{ define "content" }}
{{- with .Data -}}

Name {{- if eq .Sort "name" -}} {{- if eq .Order "asc" -}} arrow_downward {{- else -}} arrow_upward {{- end -}} {{- else -}} arrow_downward {{- end -}}

File Size {{- if eq .Sort "size" -}} {{- if eq .Order "asc" -}} arrow_downward {{- else -}} arrow_upward {{- end -}} {{- else -}} arrow_downward {{- end -}}

Last modified

{{ if and (eq .NumDirs 0) (eq .NumFiles 0) }}

It feels lonely here.

{{ end }} {{- if not (eq .NumDirs 0)}}

Folders

{{- range .Items }} {{- if (.IsDir) }} {{ template "item" .}} {{- end }} {{- end }}
{{- end }} {{- if not (eq .NumFiles 0)}}

Files

{{- range .Items }} {{- if (not .IsDir) }} {{ template "item" .}} {{- end }} {{- end }}
{{- end }}
{{- end -}} {{- end -}} {{ define "item" }}
{{- if .IsDir}} folder {{- else}} {{ if eq .Type "image" }} insert_photo {{ else if eq .Type "audio" }} volume_up {{ else if eq .Type "video" }} movie {{ else }} insert_drive_file {{ end }} {{- end}}

{{.Name}}

{{- if .IsDir}}

{{- else}}

{{.HumanSize}}

{{- end}}

{{ end }}