2014-09-18 17:39:51 +02:00
|
|
|
<% var postContentUrl = '/data/posts/' + post.name %>
|
|
|
|
|
|
|
|
<% if (post.contentType == 'image') { %>
|
|
|
|
|
|
|
|
<img alt="<%= post.name %>" src="<%= postContentUrl %>"/>
|
|
|
|
|
|
|
|
<% } else if (post.contentType == 'youtube') { %>
|
|
|
|
|
|
|
|
<iframe src="//www.youtube.com/embed/<%= post.contentChecksum %>?wmode=opaque" allowfullscreen></iframe>
|
|
|
|
|
|
|
|
<% } else if (post.contentType == 'flash') { %>
|
|
|
|
|
|
|
|
<object
|
2014-09-18 19:30:12 +02:00
|
|
|
type="<%= post.contentMimeType %>"
|
2014-09-18 17:39:51 +02:00
|
|
|
width="<%= post.imageWidth %>"
|
|
|
|
height="<%= post.imageHeight %>"
|
|
|
|
data="<%= postContentUrl %>">
|
|
|
|
<param name="wmode" value="opaque"/>
|
|
|
|
<param name="movie" value="<%= postContentUrl %>"/>
|
|
|
|
</object>
|
|
|
|
|
|
|
|
<% } else if (post.contentType == 'video') { %>
|
|
|
|
|
|
|
|
<video controls>
|
2014-09-18 19:30:12 +02:00
|
|
|
<source type="<%= post.contentMimeType %>" src="<%= postContentUrl %>"/>
|
2014-09-18 17:39:51 +02:00
|
|
|
|
|
|
|
Your browser doesn't support HTML5 videos.
|
|
|
|
</video>
|
|
|
|
|
|
|
|
<% } else { console.log(new Error('Unknown post type')) } %>
|