thelounge/client/views/msg_preview.tpl

51 lines
1.6 KiB
Smarty
Raw Normal View History

2017-06-26 09:01:55 +00:00
{{#preview}}
<div class="toggle-content toggle-type-{{type}}{{#if shown}} show{{/if}}">
2017-06-26 09:01:55 +00:00
{{#equal type "image"}}
<a class="toggle-thumbnail" href="{{link}}" target="_blank" rel="noopener">
2017-12-29 10:06:18 +00:00
<img src="{{thumb}}" decoding="async" alt="">
</a>
2017-12-09 23:25:01 +00:00
{{/equal}}
{{#equal type "audio"}}
<audio controls preload="metadata">
<source src="{{media}}" type="{{mediaType}}">
2017-12-09 23:25:01 +00:00
Your browser does not support the audio element.
</audio>
{{/equal}}
{{#equal type "video"}}
2017-12-14 11:12:22 +00:00
<video preload="metadata" controls>
<source src="{{media}}" type="{{mediaType}}">
2017-12-09 23:25:01 +00:00
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">
2017-12-29 10:06:18 +00:00
<img src="{{thumb}}" decoding="async" alt="" class="thumb">
</a>
2017-12-09 23:25:01 +00:00
{{/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>
2017-06-26 09:01:55 +00:00
{{/equal}}
{{#equal type "error"}}
2017-12-28 21:31:19 +00:00
{{#equal error "image-too-big"}}
<em>
This image is larger than {{friendlysize maxSize}} and cannot be
previewed.
<a href="{{link}}" target="_blank" rel="noopener">Click here</a>
to open it in a new window.
</em>
{{/equal}}
{{#equal error "message"}}
2018-02-23 11:47:55 +00:00
<em>
There was an error loading preview for this link.
<a href="{{link}}" target="_blank" rel="noopener">Click here</a>
to open it in a new window.
<small class="prefetch-error">({{message}})</small>
</em>
{{/equal}}
{{/equal}}
</div>
2017-06-26 09:01:55 +00:00
{{/preview}}