client/posts: allow clicking on upload thumbnails
This commit is contained in:
parent
b68f833ce9
commit
cf1e1670c4
2 changed files with 14 additions and 6 deletions
|
@ -40,12 +40,16 @@
|
||||||
label
|
label
|
||||||
margin-right: 1em
|
margin-right: 1em
|
||||||
|
|
||||||
.thumbnail
|
.thumbnail-wrapper
|
||||||
float: left
|
float: left
|
||||||
width: 12.5em
|
width: 12.5em
|
||||||
height: 7em
|
height: 7em
|
||||||
margin: 0.2em 1em 0 0
|
margin: 0.2em 1em 0 0
|
||||||
|
|
||||||
|
.thumbnail
|
||||||
|
width: 100%
|
||||||
|
height: 100%
|
||||||
|
|
||||||
.controls
|
.controls
|
||||||
float: right
|
float: right
|
||||||
a
|
a
|
||||||
|
|
|
@ -5,17 +5,21 @@
|
||||||
<a href class='remove'><i class='fa fa-remove'></i></a>
|
<a href class='remove'><i class='fa fa-remove'></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='thumbnail'>
|
<div class='thumbnail-wrapper'>
|
||||||
<% if (['image'].includes(ctx.uploadable.type)) { %>
|
<% if (['image'].includes(ctx.uploadable.type)) { %>
|
||||||
|
|
||||||
|
<a href='<%= ctx.uploadable.previewUrl %>'>
|
||||||
<%= ctx.makeThumbnail(ctx.uploadable.previewUrl) %>
|
<%= ctx.makeThumbnail(ctx.uploadable.previewUrl) %>
|
||||||
|
</a>
|
||||||
|
|
||||||
<% } else if (['video'].includes(ctx.uploadable.type)) { %>
|
<% } else if (['video'].includes(ctx.uploadable.type)) { %>
|
||||||
|
|
||||||
<div class='thumbnail'>
|
<div class='thumbnail'>
|
||||||
|
<a href='<%= ctx.uploadable.previewUrl %>'>
|
||||||
<video id='video' nocontrols muted>
|
<video id='video' nocontrols muted>
|
||||||
<source type='<%- ctx.uploadable.mimeType %>' src='<%- ctx.uploadable.previewUrl %>'/>
|
<source type='<%- ctx.uploadable.mimeType %>' src='<%- ctx.uploadable.previewUrl %>'/>
|
||||||
</video>
|
</video>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
|
|
Loading…
Reference in a new issue