diff options
author | Volpeon <git@volpeon.ink> | 2022-02-28 14:03:13 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2022-02-28 14:03:13 +0100 |
commit | 98c7f824e80eeeb4344d3c528d54f639ec4158ce (patch) | |
tree | 5d75b84c9cee2b406ab50a69527fc8a8f74de418 /tpl | |
parent | Fix (diff) | |
download | iro-design-98c7f824e80eeeb4344d3c528d54f639ec4158ce.tar.gz iro-design-98c7f824e80eeeb4344d3c528d54f639ec4158ce.tar.bz2 iro-design-98c7f824e80eeeb4344d3c528d54f639ec4158ce.zip |
Added badge
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/index.pug | 11 | ||||
-rw-r--r-- | tpl/objects/badge.pug | 11 |
2 files changed, 22 insertions, 0 deletions
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 | |||
5 | 5 | ||
6 | include objects/heading.pug | 6 | include objects/heading.pug |
7 | include objects/rule.pug | 7 | include objects/rule.pug |
8 | include objects/badge.pug | ||
8 | include objects/button.pug | 9 | include objects/button.pug |
9 | include objects/text-field.pug | 10 | include objects/text-field.pug |
10 | include objects/field-label.pug | 11 | include objects/field-label.pug |
@@ -98,6 +99,16 @@ html | |||
98 | 99 | ||
99 | //----------------------------------------- | 100 | //----------------------------------------- |
100 | 101 | ||
102 | +h1-heading('xl')= 'Badge' | ||
103 | +rule('medium') | ||
104 | |||
105 | +box | ||
106 | +badge= '100' | ||
107 | = ' ' | ||
108 | +badge('accent')= 'new' | ||
109 | |||
110 | //----------------------------------------- | ||
111 | |||
101 | +h1-heading('xl')= 'Button' | 112 | +h1-heading('xl')= 'Button' |
102 | +rule('medium') | 113 | +rule('medium') |
103 | 114 | ||
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 @@ | |||
1 | mixin badge(variant) | ||
2 | - | ||
3 | let classes = { | ||
4 | 'o-badge': true, | ||
5 | } | ||
6 | if (variant) { | ||
7 | classes['o-badge--' + variant] = true | ||
8 | } | ||
9 | |||
10 | div(class=classes) | ||
11 | block | ||