hbs-helper
Version:
handlebar template engine's helper
17 lines (15 loc) • 402 B
JavaScript
module.exports= function(hbs){
hbs.registerHelper('gridValue', function (length) {
var string;
if (length == 1) {
string = "col-md-12 sm-col-12";
} else if (length == 2) {
string = "col-md-6 sm-col-6";
} else if (length == 3) {
string = "col-md-4 sm-col-6";
} else if (length >= 4) {
string = "col-md-3 sm-col-6";
}
return string;
});
}