diff options
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 | ||
