PortableInfobox/templates/PortableInfoboxItemMedia.hbs

7 lines
638 B
Handlebars
Raw Normal View History

2018-08-12 09:45:29 +00:00
<figure class="pi-item pi-image{{#if isVideo}} pi-video{{/if}}">
<a href="{{url}}" class="image image-thumbnail{{#isVideo}} video video-thumbnail{{/isVideo}}" title="{{alt}}">
{{#if isImage}}<img src="{{thumbnail}}" srcset="{{thumbnail}} 1x, {{thumbnail2x}} 2x" class="pi-image-thumbnail" alt="{{alt}}" width="{{{width}}}" height="{{{height}}}"/>
{{else}}{{#if isVideo}}<video src="{{url}}" class="pi-video-player" controls="true" controlsList="nodownload" preload="metadata">{{alt}}</video>{{else}}{{alt}}{{/if}}{{/if}}
</a>
{{#if caption}}<figcaption class="pi-item-spacing pi-caption">{{{caption}}}</figcaption>{{/if}}
</figure>