From 14bbe30114d2acf123ed917a530f35d3e9d03fae Mon Sep 17 00:00:00 2001 From: Volpeon Date: Mon, 4 Apr 2022 17:55:20 +0200 Subject: Added large badge variant --- tpl/objects/badge.pug | 5 ++++- tpl/views/badge.pug | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'tpl') diff --git a/tpl/objects/badge.pug b/tpl/objects/badge.pug index e0d8c44..cc61366 100644 --- a/tpl/objects/badge.pug +++ b/tpl/objects/badge.pug @@ -1,7 +1,10 @@ mixin badge(variant) - let classes = { - 'o-badge': true, + 'o-badge': true + } + if (attributes.size) { + classes['o-badge--' + attributes.size] = true } if (variant) { classes['o-badge--' + variant] = true diff --git a/tpl/views/badge.pug b/tpl/views/badge.pug index 9b2c3e6..ce41f25 100644 --- a/tpl/views/badge.pug +++ b/tpl/views/badge.pug @@ -4,3 +4,7 @@ mixin view-badge +badge= '100' = ' ' +badge('accent')= 'new' + = ' ' + +badge(size=200)= '100' + = ' ' + +badge('accent')(size=200)= 'new' -- cgit v1.2.3-70-g09d2