{{ define "layout" }} {{ $root := . }} {{ template "navigation" . }}

{{ template "root-link" . }} {{ range $index, $path := .Paths }} {{ if or (not $root.Request.Share.ID) (ne $index 0) }} {{ $fullPath := rebuildPaths $root.Paths $index }}  /  {{ $path }} {{ end }} {{ end }}

{{ if .File }} {{ if not .Request.Share.File }}

↳  {{ .File.Name }}

{{ end }}
{{ if not (and .Previous.IsZero .Next.IsZero) }} {{ end }} {{ else }} {{ if .Request.Share.Story }} {{ if .HasMap }} View on map {{ end }} {{ else }} Search files {{ end }} {{ end }}
{{ if .Message }} {{ template "message" .Message }} {{ end }} {{ end }}