{{ template "header" .}}
{{if .fromUser}}
{{ .fromuser.Username }}'s Avatar

{{.fromUser.Username}}

{{ .locale.Tr "gist.list.joined" }} {{.fromUser.CreatedAt}}

{{ else }} {{ if eq .mode "all" }}

{{ .locale.Tr "gist.list.all" }}

{{ else if eq .mode "search" }}

{{ .locale.Tr "gist.list.search-results" }}

{{ end }} {{ end }}
{{ if and (ne .mode "all") (ne .mode "search") }}
{{ end }}
{{ if ne (len .gists) 0 }} {{ range $gist := .gists }}

{{ $gist.User.Username }} / {{ $gist.Title }}

{{ $gist.NbLikes }} {{ $.locale.Tr "gist.list.likes" }}
{{ $gist.NbForks }} {{ $.locale.Tr "gist.list.forks" }}
{{ $gist.NbFiles }} {{ $.locale.Tr "gist.list.files" }}
{{ $.locale.Tr "gist.list.last-active" }} {{ $gist.UpdatedAt }} {{ if $gist.Forked }} • {{ $.locale.Tr "gist.list.forked-from" }} {{ $gist.Forked.User.Username }}/{{ $gist.Forked.Title }} {{ end }} {{ if $gist.Private }} • {{ visibilityStr $gist.Private false }} {{ end }}
{{ $gist.Description }}
{{ if isMarkdown $gist.PreviewFilename }}
{{ $gist.HTML | safe }}
{{ else }} {{ $ii := "1" }} {{ $i := toInt $ii }} {{ range $line := $gist.Lines }} {{ $i = inc $i }} {{ end }}
{{$i}} {{ $line | safe }}
{{ end }}
{{ end }} {{ template "pagination" . }} {{ else }}

{{ .locale.Tr "gist.list.no-gists" }}

{{ end }}
{{ template "footer" .}}