{{ template "header" .}}
{{if .fromUser}}

{{.fromUser.Username}}

Joined {{.fromUser.CreatedAt}}

{{ else }}

All gists

{{ 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 }} • Unlisted {{ 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" .}}