{{define "title"}}Newest Posts - Forums{{end}} {{define "content"}}
{{$Root := .}} {{template "ForumTabs" .}}
Found {{FormatNumberCommas .Pager.Total}} {{if .AllComments}}posts{{else}}threads{{end}} (page {{.Pager.Page}} of {{.Pager.Pages}})
{{if .FeatureUserForumsEnabled}}
{{end}}
{{if not .AllComments}} Showing only the latest comment per thread. Show all comments instead? {{else}} Showing all forum posts by most recent. Deduplicate by thread? {{end}}
{{SimplePager .Pager}}
{{range .RecentPosts}} {{$User := .Thread.Comment.User}}

{{.Thread.Title}} {{if .Thread.Pinned}} {{end}} {{if .Thread.PollID}} {{end}} {{if .Thread.Explicit}} {{end}} {{if .Thread.NoReply}} {{end}}

{{TrimEllipses (DeMarkify .Thread.Comment.Message) 256}} {{$Photos := $Root.PhotoMap.Get .Thread.Comment.ID}} {{if $Photos}}
Photo attachment
{{end}}
{{if eq .Comment.ID .Thread.CommentID}}new {{end}}thread by {{.Thread.Comment.User.Username}} in {{.Forum.Title}} {{if .Forum.Privileged}} {{end}} {{if .Forum.Explicit}} {{end}} {{if .Forum.Private}} {{end}} – {{SincePrettyCoarse .Thread.Comment.UpdatedAt}} ago
{{if ne .Comment.ID .Thread.CommentID}}
{{TrimEllipses (DeMarkify .Comment.Message) 256}} {{$Photos := $Root.PhotoMap.Get .Comment.ID}} {{if $Photos}}
Photo attachment
{{end}}
{{SincePrettyCoarse .Comment.UpdatedAt}} ago
{{end}}
{{end}}
{{range .Categories}}

{{.Category}}

{{if eq (len .Forums) 0}} There are no forums under this category. {{if not $Root.CurrentUser.Explicit}}Your content filters (non-explicit) may be hiding some forums.{{end}} {{else}} {{range .Forums}} {{$Stats := $Root.ForumMap.Get .ID}}

{{.Title}}

{{if .Description}} {{ToMarkdown .Description}} {{else}} No description {{end}}
{{if .Explicit}} Explicit {{end}} {{if .Privileged}} Privileged {{end}}

Latest Post

{{if $Stats.RecentThread}} {{$Stats.RecentThread.Title}} by {{$Stats.RecentThread.Comment.User.Username}}
{{if and $Stats.RecentPost (not (eq $Stats.RecentPost.ID $Stats.RecentThread.CommentID))}} Last comment by {{$Stats.RecentPost.User.Username}} {{end}} {{SincePrettyCoarse $Stats.RecentThread.UpdatedAt}} ago
{{else}} No posts found. {{end}}

Topics

{{if $Stats}} {{$Stats.Threads}} {{else}} err {{end}}

Posts

{{if $Stats}} {{$Stats.Posts}} {{else}} err {{end}}

Users

{{if $Stats}} {{$Stats.Users}} {{else}} err {{end}}
{{end}} {{end}}
{{end}}
{{SimplePager .Pager}}
{{end}}