{{template "nav-main.html" .}}
{{template "nav-repository.html" .}}
{{$lines := split .Commit.Message "\n"}}

{{index $lines 0}}

{{$hasBody := false}}{{range $i, $line := $lines}}{{if and (gt $i 0) (ne $line "")}}{{$hasBody = true}}{{end}}{{end}} {{if $hasBody}}

{{range $i, $line := $lines}}{{if and (gt $i 0) (ne $line "")}} {{$line}}
{{end}}{{end}}

{{end}}
Author {{.Commit.AuthorName}} <{{.Commit.AuthorEmail}}> {{.Commit.AuthorDate.Format "2006-01-02 15:04:05 -0700"}}
Committer {{.Commit.CommitterName}} <{{.Commit.CommitterEmail}}> {{.Commit.CommitterDate.Format "2006-01-02 15:04:05 -0700"}}
Commit {{.Commit.Hash}} (patch)
{{range .FileDiffs}} {{end}}
{{.Mode}} {{if .Deleted}} {{.Name}} {{else}} {{.Name}} {{end}} {{if .IsBinary}} bin {{humanize .OldSize}} -> {{humanize .NewSize}} {{else}} {{add .Addition .Deletion}} {{end}} {{if not .IsBinary}} {{$total := add .Addition .Deletion}} {{if gt $total 0}} {{$max := $.MaxChanges}} {{if eq $max 0}}{{$max = 1}}{{end}} {{$scaledTotal := multiply (divide (float64 $total) (float64 $max)) 200.0}} {{$addWidth := multiply (divide (float64 .Addition) (float64 $total)) $scaledTotal}} {{$delWidth := multiply (divide (float64 .Deletion) (float64 $total)) $scaledTotal}} {{end}} {{end}}
{{len .FileDiffs}} files changed, {{.Commit.Additions}} insertions, {{.Commit.Deletions}} deletions
{{if .Commit.TooLarge}}

Commit too large to display

{{else}} {{range .FileDiffs}} {{if .TooLarge}} {{else}} {{range .Lines}} {{if eq .Type "gap"}} {{else}} {{end}} {{end}} {{end}}
diff --git a/{{.Name}} b/{{.Name}}
Changes too big to display
...
{{.LeftNo}}
{{if .Left}}{{.Left}}{{else}}  {{end}}
{{.RightNo}}
{{if .Right}}{{.Right}}{{else}}  {{end}}
{{else}}

No changes in this commit.

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