{{ define "_gist_preview" }}

{{ .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 .gist.PreviewFilename }} {{ 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 }} {{ else }}

{{ .locale.Tr "gist.no-content" }}

{{ end }}
{{ end }}