head-args, body-args, footer-args in hero helper.

master
Luka Vandervelden 2020-01-07 08:08:15 +01:00
parent 6cb65ef94d
commit 4750470bab
2 changed files with 8 additions and 5 deletions

View File

@ -90,9 +90,9 @@
},
navbarItem: alias('a.navbar-item'),
hero: function(args){
var head, body, footer;
var head, headArgs, body, bodyArgs, footer, footerArgs;
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]);
return h('div.hero', args, [(head = args.head) ? (headArgs = args.headArgs || {}, h('div.hero-head', headArgs, head)) : void 8, (body = args.body) ? (bodyArgs = args.bodyArgs || {}, h('div.hero-body', bodyArgs, body)) : void 8, (footer = args.footer) ? (footerArgs = args.footerArgs || {}, h('div.hero-footer', footerArgs, footer)) : void 8]);
},
card: function(args){
var header, title, icon, content, footer;

View File

@ -118,13 +118,16 @@ module.exports = {
h \div.hero args, [
if head = args.head
h \div.hero-head head
head-args = args.head-args || {}
h \div.hero-head head-args, head
if body = args.body
h \div.hero-body body
body-args = args.body-args || {}
h \div.hero-body body-args, body
if footer = args.footer
h \div.hero-footer footer
footer-args = args.footer-args || {}
h \div.hero-footer footer-args, footer
]
card: (args) ->