From 4750470bab0dd1f681115da37bb11cc36d651a32 Mon Sep 17 00:00:00 2001 From: Luka Vandervelden Date: Tue, 7 Jan 2020 08:08:15 +0100 Subject: [PATCH] head-args, body-args, footer-args in hero helper. --- bulma.js | 4 ++-- bulma.ls | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/bulma.js b/bulma.js index 18cbfba..56a9dd4 100644 --- a/bulma.js +++ b/bulma.js @@ -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; diff --git a/bulma.ls b/bulma.ls index f22c844..736f13d 100644 --- a/bulma.ls +++ b/bulma.ls @@ -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) ->