{{ $imagePathOld := printf "%s/%s" .root.BeforeRawPath (EscapePound .file.OldName) }} {{ $imagePathNew := printf "%s/%s" .root.RawPath (EscapePound .file.Name) }} {{ $imageInfoBase := (call .root.ImageInfoBase .file.OldName) }} {{ $imageInfoHead := (call .root.ImageInfo .file.Name) }} {{if or $imageInfoBase $imageInfoHead}}
{{if $imageInfoBase }}

{{.root.i18n.Tr "repo.diff.file_before"}}

{{ $classWidth := "" }} {{ $classHeight := "" }} {{ $classByteSize := "" }} {{if $imageInfoHead}} {{if not (eq $imageInfoBase.Width $imageInfoHead.Width)}} {{ $classWidth = "red" }} {{end}} {{if not (eq $imageInfoBase.Height $imageInfoHead.Height)}} {{ $classHeight = "red" }} {{end}} {{if not (eq $imageInfoBase.ByteSize $imageInfoHead.ByteSize)}} {{ $classByteSize = "red" }} {{end}} {{end}} {{.root.i18n.Tr "repo.diff.file_image_width"}}: {{$imageInfoBase.Width}}  |  {{.root.i18n.Tr "repo.diff.file_image_height"}}: {{$imageInfoBase.Height}}  |  {{.root.i18n.Tr "repo.diff.file_byte_size"}}: {{FileSize $imageInfoBase.ByteSize}}

{{end}} {{if $imageInfoHead }}

{{.root.i18n.Tr "repo.diff.file_after"}}

{{ $classWidth := "" }} {{ $classHeight := "" }} {{ $classByteSize := "" }} {{if $imageInfoBase}} {{if not (eq $imageInfoBase.Width $imageInfoHead.Width)}} {{ $classWidth = "green" }} {{end}} {{if not (eq $imageInfoBase.Height $imageInfoHead.Height)}} {{ $classHeight = "green" }} {{end}} {{if not (eq $imageInfoBase.ByteSize $imageInfoHead.ByteSize)}} {{ $classByteSize = "green" }} {{end}} {{end}} {{.root.i18n.Tr "repo.diff.file_image_width"}}: {{$imageInfoHead.Width}}  |  {{.root.i18n.Tr "repo.diff.file_image_height"}}: {{$imageInfoHead.Height}}  |  {{.root.i18n.Tr "repo.diff.file_byte_size"}}: {{FileSize $imageInfoHead.ByteSize}}

{{end}}
{{if and $imageInfoBase $imageInfoHead}}
{{end}}
{{end}}