From 31ec459db3dca3b78bbcf023c7d4e93dfa32e5d8 Mon Sep 17 00:00:00 2001 From: Luka Vandervelden Date: Tue, 7 Jan 2020 07:42:08 +0100 Subject: [PATCH] hero helper added. --- bulma.js | 7 ++++++- bulma.ls | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/bulma.js b/bulma.js index acf3fd5..16eb759 100644 --- a/bulma.js +++ b/bulma.js @@ -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); diff --git a/bulma.ls b/bulma.ls index 27b5cb6..30d6220 100644 --- a/bulma.ls +++ b/bulma.ls @@ -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 + ] }