hardlounge/client/views/msg_preview.tpl
2017-12-13 17:52:07 -08:00

33 lines
1015 B
Smarty

{{#preview}}
<div class="toggle-content toggle-type-{{type}}{{#if shown}} show{{/if}}">
{{#equal type "image"}}
<a class="toggle-thumbnail" href="{{link}}" target="_blank" rel="noopener">
<img src="{{thumb}}">
</a>
{{/equal}}
{{#equal type "audio"}}
<audio controls preload="metadata">
<source src="{{link}}" type="{{res}}">
Your browser does not support the audio element.
</audio>
{{/equal}}
{{#equal type "video"}}
<video width="320" height="240" preload="metadata" controls>
<source src="{{link}}" type="{{res}}">
Your browser does not support the video element.
</video>
{{/equal}}
{{#equal type "link"}}
{{#if thumb}}
<a class="toggle-thumbnail" href="{{link}}" target="_blank" rel="noopener">
<img src="{{thumb}}" class="thumb">
</a>
{{/if}}
<a class="toggle-text" href="{{link}}" target="_blank" rel="noopener">
<div class="head" title="{{head}}">{{head}}</div>
<div class="body" title="{{body}}">{{body}}</div>
</a>
{{/equal}}
</div>
{{/preview}}