[Embed] Add UI element and fix some bugs
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
<article class="h-entry embed">
|
||||
<header>
|
||||
{% if attributes != false %}
|
||||
<img class="u-photo embed" width="{{attributes['width']}}" height="{{attributes['height']}}" src="{{attributes['src']}}" />
|
||||
{% if attributes['has_attachment'] != false %}
|
||||
{% set thumbnail_parameters = {
|
||||
'id': embed.getAttachmentId(),
|
||||
'w': attributes['width'],
|
||||
'h': attributes['height']
|
||||
} %}
|
||||
<img alt="{{embed.getTitle() | escape}}" class="{{attributes['class']}}"
|
||||
width="{{attributes['width']}}" height="{{attributes['height']}}"
|
||||
src="{{ path('attachment_thumbnail', thumbnail_parameters) }}" />
|
||||
{% endif %}
|
||||
<h5 class="p-name embed">
|
||||
<a class="u-url" href="{{link.getUrl()}}">{{embed.getTitle() | escape}}</a>
|
||||
@@ -28,6 +35,6 @@
|
||||
</div>
|
||||
</header>
|
||||
<div class="p-summary embed">
|
||||
{{ embed.getHtml() | escape }}
|
||||
{{ embed.getDescription() | escape }}
|
||||
</div>
|
||||
</article>
|
Reference in New Issue
Block a user