mirror of https://gitlab.com/ngerakines/tavern.git
59 lines
3.0 KiB
HTML
59 lines
3.0 KiB
HTML
{{ define "activity_announce_note" }}
|
|
{{ $actors := .actors }}
|
|
{{ $announcements := .announcements }}
|
|
{{ with $item := .item }}
|
|
{{ with $boost := $item.announce_note}}
|
|
{{ with $note := $boost.note }}
|
|
<li class="media mb-3 border-top border-secondary pt-2">
|
|
<i class="fas fa-megaphone align-self-start fa-2x mr-3 text-secondary"></i>
|
|
<div class="media-body">
|
|
<p>
|
|
<img src="{{- $actors.Lookup "icon" $note.author -}}?size=14" alt="icon" />
|
|
Note by
|
|
<a href="{{ $note.author }}">
|
|
{{- $actors.Lookup "name" $note.author -}}
|
|
</a>
|
|
boosted by
|
|
<a href="{{ $boost.announcer }}">
|
|
{{- $actors.Lookup "name" $boost.announcer -}}
|
|
</a>
|
|
on {{ datetime $note.published_at }}
|
|
</p>
|
|
{{- $note.content | toHTML -}}
|
|
|
|
<div class="card">
|
|
{{ if or $note.tags $note.mentions }}
|
|
<div class="card-body m-1 p-1">
|
|
{{ if $note.tags}}
|
|
Tags:
|
|
{{ range $tag, $tagLink := $note.tags }}
|
|
<a href="{{ $tagLink }}">{{ $tag }}</a>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ if $note.mentions }}
|
|
Mentions:
|
|
{{ range $tag, $tagLink := $note.mentions }}
|
|
<a class="card-link" href="{{ $tagLink }}">{{ $tag }}</a>
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
{{ end }}
|
|
<div class="card-body m-1 p-1">
|
|
{{ if eq true (lookupBool $announcements $note.object_id false) }}
|
|
<a href="#" class="btn btn-primary btn-sm disabled"
|
|
data-object="{{ $note.object_id }}">Announced</a>
|
|
{{ else }}
|
|
<a href="#" class="btn btn-primary btn-sm announce"
|
|
data-object="{{ $note.object_id }}">Announce</a>
|
|
{{ end }}
|
|
{{- if $note.conversation -}}
|
|
<a href="#" class="btn btn-primary btn-sm">Reply</a>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }} |