31 lines
1.2 KiB
HTML
31 lines
1.2 KiB
HTML
{{/*
|
|
This template is intended to display a single thread in the context of a forum, the feed, or a similar layout.
|
|
|
|
It should be called with ThreadListItem.
|
|
*/}}
|
|
|
|
<div class="thread-list-item flex items-center ph3 pv2 {{ if .Unread }}unread{{ else }}read{{ end }} post-list-bg-odd {{ .Classes }}">
|
|
<img class="avatar-icon mr2" src="{{ .FirstUser.AvatarUrl }}">
|
|
<div class="flex-grow-1 overflow-hidden">
|
|
<div class="title nowrap truncate"><a href="{{ .Url }}">{{ .Title }}</a></div>
|
|
<div class="details">
|
|
<a class="user" href="{{ .FirstUser.ProfileUrl }}">{{ .FirstUser.Name }}</a> — {{ timehtml (relativedate .FirstDate) .FirstDate }}
|
|
</div>
|
|
{{ with .Content }}
|
|
<div class="mt2">
|
|
{{ . }}
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
<div class="latestpost dn flex-ns flex-shrink-0 items-center ml2">
|
|
<img class="avatar-icon mr2" src="{{ .LastUser.AvatarUrl }}">
|
|
<div>
|
|
<div>Last post {{ timehtml (relativedate .LastDate) .LastDate }}</div>
|
|
<a class="user" href="{{ .LastUser.ProfileUrl }}">{{ .LastUser.Name }}</a>
|
|
</div>
|
|
</div>
|
|
<div class="goto">
|
|
<a href="{{ .Url }}">»</a>
|
|
</div>
|
|
</div>
|