From 98c7f824e80eeeb4344d3c528d54f639ec4158ce Mon Sep 17 00:00:00 2001 From: Volpeon Date: Mon, 28 Feb 2022 14:03:13 +0100 Subject: Added badge --- tpl/index.pug | 11 +++++++++++ tpl/objects/badge.pug | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 tpl/objects/badge.pug (limited to 'tpl') diff --git a/tpl/index.pug b/tpl/index.pug index ed538df..4926889 100644 --- a/tpl/index.pug +++ b/tpl/index.pug @@ -5,6 +5,7 @@ include layouts/container.pug include objects/heading.pug include objects/rule.pug +include objects/badge.pug include objects/button.pug include objects/text-field.pug include objects/field-label.pug @@ -98,6 +99,16 @@ html //----------------------------------------- + +h1-heading('xl')= 'Badge' + +rule('medium') + + +box + +badge= '100' + = ' ' + +badge('accent')= 'new' + + //----------------------------------------- + +h1-heading('xl')= 'Button' +rule('medium') diff --git a/tpl/objects/badge.pug b/tpl/objects/badge.pug new file mode 100644 index 0000000..e0d8c44 --- /dev/null +++ b/tpl/objects/badge.pug @@ -0,0 +1,11 @@ +mixin badge(variant) + - + let classes = { + 'o-badge': true, + } + if (variant) { + classes['o-badge--' + variant] = true + } + + div(class=classes) + block -- cgit v1.2.3-70-g09d2