{{ define "posts" }} {{ $board := .Board }} {{ $len := len .Posts }} {{ range .Posts }} {{ $opId := .Id }} {{ if eq $board.InReplyTo "" }}
{{ end }}
{{ if eq $board.ModCred $board.Domain $board.Actor.Id }} [Delete Post] {{ end }} {{ if .Attachment }} {{ if eq $board.ModCred $board.Domain $board.Actor.Id }} [Delete Attachment] [Mark Sensitive] {{ end }} File: {{ (index .Attachment 0).Name }}({{ (index .Attachment 0).Size }})
{{ end }} {{ .Name }}{{ if .AttributedTo }} {{.AttributedTo }} {{ else }} Anonymous {{ end }} {{ .TripCode }} {{ .Published }} No. {{ .Id }} {{ if ne .Type "Tombstone" }}[Report]{{ end }}

{{.Content}}

{{ if .Replies }} {{ $replies := .Replies }} {{ if gt $replies.TotalItems 5 }} {{ if gt $len 1 }} {{ $replies.TotalItems }} replies{{ if gt $replies.TotalImgs 0}} and {{ $replies.TotalImgs }} images{{ end }}, Click here to view all. {{ end }} {{ end }} {{ range $replies.OrderedItems }}
>>
{{ if eq $board.ModCred $board.Domain $board.Actor.Id }} [Delete Post] {{ end }} {{ if .Attachment }} {{ if eq $board.ModCred $board.Domain $board.Actor.Id }} [Delete Attachment] [Mark Sensitive] {{ end }} File {{ (index .Attachment 0).Name }} ({{ (index .Attachment 0).Size }})
{{ end }} {{ .Name }}{{ if .AttributedTo }} {{.AttributedTo }} {{ else }} Anonymous {{ end }} {{ .TripCode }} {{ .Published }} No. {{ .Id }} {{ if ne .Type "Tombstone" }}[Report]{{ end }} {{ $parentId := .Id }} {{ if .Replies.OrderedItems }} {{ range .Replies.OrderedItems }} {{ end }} {{ end }}

{{.Content}}

{{ end }} {{ end }}
{{ end }} {{ end }}