From d23a2cf25ccc33f49d73ee3da2f775c0d4fa0784 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 27 Jun 2024 09:56:02 +0200 Subject: Update --- tpl/objects/card.pug | 29 +++++++++++++++++++++++++++++ tpl/objects/table.pug | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 tpl/objects/card.pug (limited to 'tpl/objects') 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) -- cgit v1.2.3-70-g09d2