card helper added.
parent
31ec459db3
commit
6cb65ef94d
5
bulma.js
5
bulma.js
|
@ -93,6 +93,11 @@
|
|||
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]);
|
||||
},
|
||||
card: function(args){
|
||||
var header, title, icon, content, footer;
|
||||
args || (args = {});
|
||||
return h('div.card', args, [(header = args.header) ? h('div.card-header', [(title = header.title) ? h('div.card-header-title', [title]) : void 8, (icon = header.icon) ? h('div.card-header-icon', [icon]) : void 8]) : void 8, (content = args.content) ? h('div.card-content', content) : void 8, (footer = args.footer) ? h('div.card-footer', footer) : void 8]);
|
||||
}
|
||||
};
|
||||
}).call(this);
|
||||
|
|
18
bulma.ls
18
bulma.ls
|
@ -126,5 +126,23 @@ module.exports = {
|
|||
if footer = args.footer
|
||||
h \div.hero-footer footer
|
||||
]
|
||||
|
||||
card: (args) ->
|
||||
args or= {}
|
||||
|
||||
h \div.card args, [
|
||||
if header = args.header
|
||||
h \div.card-header [
|
||||
if title = header.title
|
||||
h \div.card-header-title [ title ]
|
||||
if icon = header.icon
|
||||
h \div.card-header-icon [ icon ]
|
||||
]
|
||||
if content = args.content
|
||||
h \div.card-content content
|
||||
|
||||
if footer = args.footer
|
||||
h \div.card-footer footer
|
||||
]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue