2021-10-23 22:28:06 +00:00
|
|
|
{{/*
|
|
|
|
TODO: The logic in here for how to present various types of timeline items needs to be more robust.
|
|
|
|
*/}}
|
|
|
|
|
|
|
|
{{ if or .Description .EmbedMedia }}
|
|
|
|
<div class="timeline-item flex flex-column pa3 mb2 br3" data-filter-title="{{ .FilterTitle }}">
|
|
|
|
<div class="timeline-user-info mb2 flex items-center">
|
|
|
|
<img class="avatar-icon lite mr2" src="{{ .OwnerAvatarUrl }}"/>
|
|
|
|
<a class="user" href="{{ .OwnerUrl }}">{{ .OwnerName }}</a>
|
|
|
|
<a class="datetime tr" style="flex: 1 1 auto;" href="{{ .Url }}">{{ timehtml (relativedate .Date) .Date }}</a>
|
|
|
|
</div>
|
|
|
|
<div class="mb2">{{ .Description }}</div>
|
|
|
|
{{ range .EmbedMedia }}
|
|
|
|
<div class="timeline-content-box {{ if eq .Type mediaembed }}embed{{ end }}">
|
|
|
|
{{ if eq .Type mediaimage }}
|
|
|
|
<img src="{{ .AssetUrl }}">
|
|
|
|
{{ else if eq .Type mediavideo }}
|
|
|
|
<video src="{{ .AssetUrl }}" preload="metadata" controls>
|
|
|
|
{{ else if eq .Type mediaaudio }}
|
|
|
|
<audio src="{{ .AssetUrl }}" controls>
|
|
|
|
{{ else if eq .Type mediaembed }}
|
|
|
|
{{ .EmbedHTML }}
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ else }}
|
|
|
|
<div class="timeline-item flex pa3 mb2 br3" data-filter-title="{{ .FilterTitle }}">
|
2021-07-08 07:40:30 +00:00
|
|
|
<img class="avatar-icon big lite mr3" src="{{ .OwnerAvatarUrl }}"/>
|
|
|
|
<div class="timeline-info overflow-hidden">
|
|
|
|
{{ template "breadcrumbs.html" .Breadcrumbs }}
|
|
|
|
<div class="title f5 b nowrap truncate"><span>{{ .TypeTitle }}</span>: <a href="{{ .Url }}" class="title-text normal">{{ .Title }}</a></div>
|
|
|
|
<div class="details">
|
|
|
|
<a class="user" href="{{ .OwnerUrl }}">{{ .OwnerName }}</a> — {{ timehtml (relativedate .Date) .Date }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
|