Enhanced support for new video posts (closed #75)
|
@ -10,7 +10,12 @@
|
|||
}
|
||||
|
||||
.post-type-youtube:after,
|
||||
.post-type-flash:after {
|
||||
.post-type-swf:after,
|
||||
.post-type-mp4:after,
|
||||
.post-type-webm:after,
|
||||
.post-type-ogg:after,
|
||||
.post-type-3gp:after,
|
||||
.post-type-flv:after {
|
||||
position: absolute;
|
||||
right: 1px; /* border */
|
||||
top: 1px; /* border */
|
||||
|
@ -19,18 +24,22 @@
|
|||
content: ' ';
|
||||
pointer-events: none;
|
||||
}
|
||||
.post-type-flash {
|
||||
.post-type-youtube,
|
||||
.post-type-swf,
|
||||
.post-type-mp4,
|
||||
.post-type-webm,
|
||||
.post-type-ogg,
|
||||
.post-type-3gp,
|
||||
.post-type-flv {
|
||||
border-color: red;
|
||||
}
|
||||
.post-type-youtube {
|
||||
border-color: red;
|
||||
}
|
||||
.post-type-flash:after {
|
||||
background: url('../img/thumb-overlay-swf.png');
|
||||
}
|
||||
.post-type-youtube:after {
|
||||
background: url('../img/thumb-overlay-yt.png');
|
||||
}
|
||||
.post-type-swf:after { background: url('../img/thumb-overlay-swf.png'); }
|
||||
.post-type-youtube:after { background: url('../img/thumb-overlay-yt.png'); }
|
||||
.post-type-mp4:after { background: url('../img/thumb-overlay-mp4.png'); }
|
||||
.post-type-webm:after { background: url('../img/thumb-overlay-webm.png'); }
|
||||
.post-type-ogg:after { background: url('../img/thumb-overlay-ogg.png'); }
|
||||
.post-type-3gp:after { background: url('../img/thumb-overlay-3gp.png'); }
|
||||
.post-type-flv:after { background: url('../img/thumb-overlay-flv.png'); }
|
||||
|
||||
|
||||
.post .toggle-tag {
|
||||
|
|
BIN
public_html/media/img/thumb-overlay-3gp.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
public_html/media/img/thumb-overlay-flv.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
public_html/media/img/thumb-overlay-mp4.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
public_html/media/img/thumb-overlay-ogg.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
BIN
public_html/media/img/thumb-overlay-webm.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB |
|
@ -346,7 +346,13 @@ class TextHelper
|
|||
'image/jpeg' => 'jpg',
|
||||
'image/gif' => 'gif',
|
||||
'image/png' => 'png',
|
||||
'application/x-shockwave-flash' => 'swf'];
|
||||
'application/x-shockwave-flash' => 'swf',
|
||||
'video/mp4' => 'mp4',
|
||||
'video/webm' => 'webm',
|
||||
'video/ogg' => 'ogg',
|
||||
'application/ogg' => 'ogg',
|
||||
'video/x-flv' => 'flv',
|
||||
'video/3gpp' => '3gp'];
|
||||
return isset($mimeTypes[$mimeType])
|
||||
? $mimeTypes[$mimeType]
|
||||
: null;
|
||||
|
|
|
@ -192,6 +192,8 @@ class PostSearchParser extends AbstractSearchParser
|
|||
$type = PostType::Flash;
|
||||
elseif ($value == 'img')
|
||||
$type = PostType::Image;
|
||||
elseif ($value == 'video' or in_array($value, ['mp4', 'webm', 'ogg', '3gp', 'ogg']))
|
||||
$type = PostType::Video;
|
||||
elseif ($value == 'yt' or $value == 'youtube')
|
||||
$type = PostType::Youtube;
|
||||
else
|
||||
|
|
|
@ -4,7 +4,8 @@ CustomAssetViewDecorator::addStylesheet('post-small.css');
|
|||
$classNames =
|
||||
[
|
||||
'post',
|
||||
'post-type-' . TextHelper::camelCaseToHumanCase(PostType::toString($this->context->post->type))
|
||||
'post-type-' .(TextHelper::resolveMimeType($this->context->post->mimeType) ?:
|
||||
TextHelper::camelCaseToHumanCase(PostType::toString($this->context->post->type))),
|
||||
];
|
||||
|
||||
$masstag = (isset($this->context->source)
|
||||
|
|