forked from GNUsocial/gnu-social
46 lines
1.6 KiB
Twig
46 lines
1.6 KiB
Twig
<hr>
|
|
|
|
<article class="h-entry embed">
|
|
<header>
|
|
<a class="p-name u-url" href="{{link.getUrl()}}">{{embed.getTitle() | escape}}</a>
|
|
</header>
|
|
|
|
{% if attributes['has_attachment'] != false %}
|
|
{% set thumbnail_parameters = {
|
|
'note_id': note.getId(),
|
|
'attachment_id': embed.getAttachmentId(),
|
|
'size': 'medium'
|
|
} %}
|
|
<img alt="{{embed.getTitle() | escape}}" class="{{attributes['class']}}"
|
|
width="{{attributes['width']}}" height="{{attributes['height']}}"
|
|
src="{{ path('note_attachment_thumbnail', thumbnail_parameters) }}" />
|
|
{% endif %}
|
|
|
|
<div class="p-summary">
|
|
<div class="p-author">
|
|
{% if embed.getAuthorName() is not null %}
|
|
<div class="fn vcard author">
|
|
{% if embed.getAuthorUrl() is null %}
|
|
<p>{{embed.getAuthorName()}}</p>
|
|
{% else %}
|
|
<a href="{{embed.getAuthorUrl()}}" class="url">{{embed.getAuthorName()}}</a>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
{% if embed.getProviderName() is not null %}
|
|
<div class="fn vcard">
|
|
{% if embed.getProviderUrl() is null %}
|
|
<p>{{embed.getProviderName()}}</p>
|
|
{% else %}
|
|
<a href="{{embed.getProviderUrl()}}" class="url">{{embed.getProviderName()}}</a>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
{{ embed.getDescription() | escape }}
|
|
</div>
|
|
</article>
|