|
{{- if and (eq .Sort "namedirfirst") (ne .Order "desc")}}
{{- else if and (eq .Sort "namedirfirst") (ne .Order "asc")}}
{{- else}}
{{- end}}
{{- if and (eq .Sort "name") (ne .Order "desc")}}
Name
{{- else if and (eq .Sort "name") (ne .Order "asc")}}
Name
{{- else}}
Name
{{- end}}
|
{{- if and (eq .Sort "size") (ne .Order "desc")}} Size {{- else if and (eq .Sort "size") (ne .Order "asc")}} Size {{- else}} Size {{- end}} | {{- if and (eq .Sort "time") (ne .Order "desc")}} Modified {{- else if and (eq .Sort "time") (ne .Order "asc")}} Modified {{- else}} Modified {{- end}} | ||
|---|---|---|---|---|
| Up | ||||
| {{- if .HasExt ".md" ".mdown" ".markdown"}} {{- $viewerPath := "/viewer.html" -}} {{- $filePath := printf "/%s" .Name -}} {{- if ne $.Path "/" -}} {{- $dirPath := trimSuffix "/" $.Path -}} {{- $viewerPath = printf "%s/viewer.html" $dirPath -}} {{- $filePath = printf "%s/%s" $dirPath .Name -}} {{- end -}} {{- else}} {{- end}} {{template "icon" .}} {{- if not .SymlinkPath}} {{html .Name}} {{- else}} {{html .Name}} {{html .SymlinkPath}} {{- end}} | {{- if .IsDir}}— | {{- else}}{{- end}} |