2014-02-27 15:04:36 +01:00
|
|
|
<?php CustomAssetViewDecorator::setPageThumb(\Chibi\UrlHelper::route('post', 'thumb', ['name' => $this->context->transport->post->name])) ?>
|
2013-11-23 00:11:06 +01:00
|
|
|
<?php $post = $this->context->transport->post ?>
|
|
|
|
|
|
|
|
<?php if ($post->type == PostType::Image): ?>
|
|
|
|
|
|
|
|
<?php if (!empty($this->context->imageLink)): ?>
|
|
|
|
<a href="<?php echo $this->context->imageLink ?>">
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
<img src="<?php echo \Chibi\UrlHelper::route('post', 'retrieve', ['name' => $post->name]) ?>" alt="<?php echo $post->name ?>"/>
|
|
|
|
|
|
|
|
<?php if (!empty($this->context->imageLink)): ?>
|
|
|
|
</a>
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
<?php elseif ($post->type == PostType::Flash): ?>
|
|
|
|
|
2014-02-22 23:37:48 +01:00
|
|
|
<object type="<?php echo $post->mimeType ?>" width="<?php echo $post->imageWidth ?>" height="<?php echo $post->imageHeight ?>" data="<?php echo \Chibi\UrlHelper::route('post', 'retrieve', ['name' => $post->name]) ?>">
|
|
|
|
<param name="movie" value="<?php echo \Chibi\UrlHelper::route('post', 'retrieve', ['name' => $post->name]) ?>"/>
|
|
|
|
<param name="wmode" value="opaque"/>
|
|
|
|
</object>
|
2013-11-23 00:11:06 +01:00
|
|
|
|
|
|
|
<?php elseif ($post->type == PostType::Youtube): ?>
|
|
|
|
|
2014-02-22 23:37:48 +01:00
|
|
|
<iframe style="width: 800px; height: 600px; border: 0;" src="//www.youtube.com/embed/<?php echo $post->fileHash ?>?wmode=opaque" allowfullscreen></iframe>
|
2013-11-23 00:11:06 +01:00
|
|
|
|
2014-04-08 16:54:36 +02:00
|
|
|
<?php elseif ($post->type == PostType::Video): ?>
|
|
|
|
|
2014-04-08 17:09:13 +02:00
|
|
|
<video style="max-width: 100%" controls>
|
2014-04-08 16:54:36 +02:00
|
|
|
<source type="<?= $post->mimeType ?>" src="<?= \Chibi\UrlHelper::route('post', 'retrieve', ['name' => $post->name]) ?>">
|
|
|
|
Your browser doesn't support HTML5 <video> tag.
|
|
|
|
</video>
|
|
|
|
|
2013-11-23 00:11:06 +01:00
|
|
|
<?php endif ?>
|