2021-04-22 23:02:50 +00:00
|
|
|
{{/*
|
|
|
|
This template is intended to display a single post or thread in the context of a forum, the feed, or a similar layout.
|
|
|
|
|
2021-04-24 04:27:45 +00:00
|
|
|
It should be called with PostListItem.
|
2021-04-22 23:02:50 +00:00
|
|
|
*/}}
|
|
|
|
|
2021-04-25 19:33:22 +00:00
|
|
|
<div class="post-list-item flex items-center ph3 pv2 {{ if .Unread }}unread{{ else }}read{{ end }} {{ .Classes }}">
|
2021-04-22 23:02:50 +00:00
|
|
|
<img class="avatar-icon mr2" src="{{ .User.AvatarUrl }}">
|
|
|
|
<div class="flex-grow-1 overflow-hidden">
|
|
|
|
<div class="breadcrumbs">
|
|
|
|
{{ range $i, $breadcrumb := .Breadcrumbs }}
|
|
|
|
{{ if gt $i 0 }} » {{ end }}
|
|
|
|
<a href="{{ $breadcrumb.Url }}">{{ $breadcrumb.Name }}</a>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
<div class="title nowrap truncate"><a href="{{ .Url }}">{{ .Title }}</a></div>
|
|
|
|
<div class="details">
|
|
|
|
<a class="user" href="{{ .User.ProfileUrl }}">{{ .User.Name }}</a> — <span class="datetime">{{ relativedate .Date }}</span>
|
|
|
|
</div>
|
2021-04-25 19:33:22 +00:00
|
|
|
{{ with .Content }}
|
|
|
|
<div class="mt2">
|
|
|
|
{{ . }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2021-04-22 23:02:50 +00:00
|
|
|
</div>
|
|
|
|
<div class="goto">
|
|
|
|
<a href="{{ .Url }}">»</a>
|
|
|
|
</div>
|
|
|
|
</div>
|