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

{{.fromUser.Username}}

Joined {{.fromUser.CreatedAt}}

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

All gists

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

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 }} likes
{{ $gist.NbForks }} forks
{{ $gist.NbFiles }} files
Last active {{ $gist.UpdatedAt }} {{ if $gist.Forked }} • 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.Preview }}
{{ else }} {{ $ii := "1" }} {{ $i := toInt $ii }} {{ range $line := lines $gist.Preview }} {{ $i = inc $i }} {{ end }}
{{$i}} {{ $line }}
{{ end }}
{{ end }} {{ template "pagination" . }} {{ else }}

No gists

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