You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1.3 KiB
28 lines
1.3 KiB
<div class="comments"> |
|
{% for item in list %} |
|
{% set cid = item.id|default('') %} |
|
{% set cpk = item.pubkey|default('') %} |
|
{% set cts = item.created_at|default(null) %} |
|
<div class="card comment"> |
|
<div class="metadata"> |
|
<p>{% if cpk != '' %}<twig:Molecules:UserFromNpub ident="{{ cpk }}" />{% else %}<span class="text-subtle">Unknown</span>{% endif %}</p> |
|
<small>{% if cts is not null and cts != '' %}{{ cts|date('F j Y') }}{% endif %}</small> |
|
</div> |
|
<div class="card-body"> |
|
<twig:Atoms:Content content="{{ item.content|default('') }}" /> |
|
</div> |
|
{# Display Nostr link previews if links detected #} |
|
{% if cid != '' and commentLinks[cid] is defined and commentLinks[cid]|length > 0 %} |
|
<div class="card-footer nostr-previews mt-3"> |
|
<div class="preview-container"> |
|
{% for link in commentLinks[cid] %} |
|
<div> |
|
<twig:Molecules:NostrPreview preview="{{ link }}" /> |
|
</div> |
|
{% endfor %} |
|
</div> |
|
</div> |
|
{% endif %} |
|
</div> |
|
{% endfor %} |
|
</div>
|
|
|