mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 04:26:41 -04:00
17 lines
478 B
JavaScript
17 lines
478 B
JavaScript
![]() |
Template.postThumbnail.helpers({
|
||
|
postLink: function () {
|
||
|
return !!this.url ? Posts.getOutgoingUrl(this.url) : "/posts/"+this._id;
|
||
|
},
|
||
|
playVideoClass: function () {
|
||
|
return !!this.media ? 'post-thumbnail-has-video': '';
|
||
|
}
|
||
|
});
|
||
|
|
||
|
Template.postThumbnail.events({
|
||
|
'click .post-thumbnail-has-video': function (e) {
|
||
|
e.preventDefault();
|
||
|
$('body').addClass('showing-lightbox');
|
||
|
$(e.target).parents('.post').find('.post-video-lightbox').fadeIn('fast');
|
||
|
}
|
||
|
});
|