From d23a2cf25ccc33f49d73ee3da2f775c0d4fa0784 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 27 Jun 2024 09:56:02 +0200 Subject: Update --- tpl/index.pug | 3 +++ tpl/objects/card.pug | 29 +++++++++++++++++++++++++++++ tpl/objects/table.pug | 2 +- tpl/views/alert.pug | 6 +++--- tpl/views/card.pug | 9 +++++++++ tpl/views/table.pug | 2 +- 6 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 tpl/objects/card.pug create mode 100644 tpl/views/card.pug (limited to 'tpl') diff --git a/tpl/index.pug b/tpl/index.pug index d3e9daf..b6af02b 100644 --- a/tpl/index.pug +++ b/tpl/index.pug @@ -21,6 +21,7 @@ include objects/action-button.pug include objects/overflow-button.pug include objects/status-indicator.pug include objects/avatar.pug +include objects/card.pug include objects/popover.pug include objects/menu.pug include objects/side-nav.pug @@ -72,6 +73,7 @@ include views/action-button.pug include views/overflow-button.pug include views/status-indicator.pug include views/avatar.pug +include views/card.pug include views/popover.pug include views/menu.pug include views/side-nav.pug @@ -118,6 +120,7 @@ html +view-overflow-button +view-status-indicator +view-avatar + +view-card +view-side-nav +view-popover +view-menu diff --git a/tpl/objects/card.pug b/tpl/objects/card.pug new file mode 100644 index 0000000..d6516be --- /dev/null +++ b/tpl/objects/card.pug @@ -0,0 +1,29 @@ +mixin card + - const slots = {} + + mixin slot(key) + - slots[key] = block + + - + block ? block() : undefined + + let classes = { + 'o-card': true, + } + + if attributes.href + a(href=attributes.href class=classes) + if slots.body + .o-card__body + - slots.body() + if slots.footer + .o-card__footer + - slots.footer() + else + div(class=classes) + if slots.body + .o-card__body + - slots.body() + if slots.footer + .o-card__footer + - slots.footer() diff --git a/tpl/objects/table.pug b/tpl/objects/table.pug index e635589..c8ff17e 100644 --- a/tpl/objects/table.pug +++ b/tpl/objects/table.pug @@ -5,7 +5,7 @@ mixin table 'o-table--flush': attributes.flush, 'o-table--box': attributes.box, 'o-table--interactive': attributes.interactive, - 'o-table--50': attributes.size50, + 'o-table--sm': attributes.sm, } table(class=classes) diff --git a/tpl/views/alert.pug b/tpl/views/alert.pug index c176279..02cf508 100644 --- a/tpl/views/alert.pug +++ b/tpl/views/alert.pug @@ -3,10 +3,10 @@ mixin view-alert .c-box +alert= loremIpsum br - +alert('primary')= loremIpsum + +alert('accent')= loremIpsum br - +alert('error')= loremIpsum + +alert('negative')= loremIpsum br - +alert('success')= loremIpsum + +alert('positive')= loremIpsum br +alert('warning')= loremIpsum diff --git a/tpl/views/card.pug b/tpl/views/card.pug new file mode 100644 index 0000000..0b88b0e --- /dev/null +++ b/tpl/views/card.pug @@ -0,0 +1,9 @@ +mixin view-card + +view('card', 'Card') + .c-box + +card(href='#') + +slot('body') + h1= 'XS Heading' + p= loremIpsum + +slot('footer') + = 'Footer' diff --git a/tpl/views/table.pug b/tpl/views/table.pug index f74a4cd..6ed7263 100644 --- a/tpl/views/table.pug +++ b/tpl/views/table.pug @@ -76,7 +76,7 @@ mixin view-table +table-cell= 'Row 4,3' .c-box - +table(box=true, size50=true) + +table(box=true sm=true) +table-head +table-row +table-head-cell= 'Title' -- cgit v1.2.3-70-g09d2