hero helper added.

master
Luka Vandervelden 2020-01-07 07:42:08 +01:00
parent dce7898af3
commit 31ec459db3
2 changed files with 20 additions and 1 deletions

View File

@ -88,6 +88,11 @@
? h('div.container', innerNavbar())
: innerNavbar()]);
},
navbarItem: alias('a.navbar-item')
navbarItem: alias('a.navbar-item'),
hero: function(args){
var head, body, footer;
args || (args = {});
return h('div.hero', args, [(head = args.head) ? h('div.hero-head', head) : void 8, (body = args.body) ? h('div.hero-body', body) : void 8, (footer = args.footer) ? h('div.hero-footer', footer) : void 8]);
}
};
}).call(this);

View File

@ -112,5 +112,19 @@ module.exports = {
]
navbar-item: alias \a.navbar-item
hero: (args) ->
args or= {}
h \div.hero args, [
if head = args.head
h \div.hero-head head
if body = args.body
h \div.hero-body body
if footer = args.footer
h \div.hero-footer footer
]
}