mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
26 lines
649 B
JavaScript
26 lines
649 B
JavaScript
var post = {};
|
|
|
|
Template.post_item.created = function () {
|
|
post = this.data;
|
|
};
|
|
|
|
Template.post_item.helpers({
|
|
moduleContext: function () { // not used for now
|
|
var module = this;
|
|
module.templateClass = Telescope.utils.camelToDash(this.template) + ' ' + this.position + ' cell';
|
|
module.post = post;
|
|
return module;
|
|
},
|
|
postClass: function () {
|
|
var post = this;
|
|
var postClass = "post ";
|
|
|
|
postClass += "author-"+Telescope.utils.slugify(post.author)+" ";
|
|
|
|
if (this.sticky) {
|
|
postClass += "sticky ";
|
|
}
|
|
postClass = Telescope.callbacks.run("postClass", postClass, post);
|
|
return postClass;
|
|
}
|
|
});
|