From 977446e39cdbb5af3f5829330d5a9c91c9d5d877 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 4 Jul 2024 15:49:10 +0200 Subject: Better badge --- tpl/objects/badge.pug | 12 ++++++++++-- tpl/views/badge.pug | 27 +++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) (limited to 'tpl') diff --git a/tpl/objects/badge.pug b/tpl/objects/badge.pug index 500f062..c91e74f 100644 --- a/tpl/objects/badge.pug +++ b/tpl/objects/badge.pug @@ -15,7 +15,15 @@ mixin badge(variant) if attributes.href a(href=attributes.href class=classes) - block + if attributes.icon + +icon(attributes.icon) + = ' ' + span.o-badge__label + block else span(class=classes) - block + if attributes.icon + +icon(attributes.icon) + = ' ' + span.o-badge__label + block diff --git a/tpl/views/badge.pug b/tpl/views/badge.pug index e1aa9e2..cc1f346 100644 --- a/tpl/views/badge.pug +++ b/tpl/views/badge.pug @@ -9,6 +9,33 @@ mixin view-badge = ' ' +badge(size='xl' href='#')= '300' + .c-box + +badge(pill=true size='sm' href='#')= '50' + = ' ' + +badge(pill=true href='#')= '100' + = ' ' + +badge(pill=true size='lg' href='#')= '200' + = ' ' + +badge(pill=true size='xl' href='#')= '300' + + .c-box + +badge(icon='image' size='sm' href='#')= '50' + = ' ' + +badge(icon='image' href='#')= '100' + = ' ' + +badge(icon='image' size='lg' href='#')= '200' + = ' ' + +badge(icon='image' size='xl' href='#')= '300' + + .c-box + +badge(pill=true icon='image' size='sm' href='#')= '50' + = ' ' + +badge(pill=true icon='image' href='#')= '100' + = ' ' + +badge(pill=true icon='image' size='lg' href='#')= '200' + = ' ' + +badge(pill=true icon='image' size='xl' href='#')= '300' + .c-box +badge(href='#')= '100' = ' ' -- cgit v1.2.3-70-g09d2