{{ template "header" .}} {{ template "gist_header" .}} {{ if .files }}
{{ range $file := .files }} {{ $csv := csvFile $file.File }}
{{ $file.Filename }} {{ $.locale.Tr "gist.raw" }}
{{ if $file.Truncated }}
{{ $.locale.Tr "gist.file-truncated" }} {{ $.locale.Tr "gist.watch-full-file" }}.
{{ end }} {{ if and (not $csv) (isCsv $file.Filename) }}
{{ $.locale.Tr "gist.file-not-valid" }}
{{ end }}
{{ if $csv }} {{ range $csv.Header }} {{ end }} {{ range $csv.Rows }} {{ range . }} {{ end }} {{ end }}
{{ . }}
{{ . }}
{{ else if isMarkdown $file.Filename }}
{{ $file.HTML | safe }}
{{ else }}
{{ $fileslug := slug $file.Filename }} {{ if ne $file.Content "" }} {{ $ii := "1" }} {{ $i := toInt $ii }} {{ range $line := $file.Lines }}{{ $i = inc $i }}{{ end }}
{{$i}}{{ $line | safe }}
{{ end }}
{{ end }}
{{ end }}
{{ else }}

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

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