diff options
author | Volpeon <git@volpeon.ink> | 2022-04-04 17:55:20 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2022-04-04 17:55:20 +0200 |
commit | 14bbe30114d2acf123ed917a530f35d3e9d03fae (patch) | |
tree | 5ba402d94b07a679a56530ba6c63510bbc7e613b /tpl | |
parent | Update badge (diff) | |
download | iro-design-14bbe30114d2acf123ed917a530f35d3e9d03fae.tar.gz iro-design-14bbe30114d2acf123ed917a530f35d3e9d03fae.tar.bz2 iro-design-14bbe30114d2acf123ed917a530f35d3e9d03fae.zip |
Added large badge variant
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/objects/badge.pug | 5 | ||||
-rw-r--r-- | tpl/views/badge.pug | 4 |
2 files changed, 8 insertions, 1 deletions
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 @@ | |||
1 | mixin badge(variant) | 1 | mixin badge(variant) |
2 | - | 2 | - |
3 | let classes = { | 3 | let classes = { |
4 | 'o-badge': true, | 4 | 'o-badge': true |
5 | } | ||
6 | if (attributes.size) { | ||
7 | classes['o-badge--' + attributes.size] = true | ||
5 | } | 8 | } |
6 | if (variant) { | 9 | if (variant) { |
7 | classes['o-badge--' + variant] = true | 10 | 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 | |||
4 | +badge= '100' | 4 | +badge= '100' |
5 | = ' ' | 5 | = ' ' |
6 | +badge('accent')= 'new' | 6 | +badge('accent')= 'new' |
7 | = ' ' | ||
8 | +badge(size=200)= '100' | ||
9 | = ' ' | ||
10 | +badge('accent')(size=200)= 'new' | ||