diff options
| author | Volpeon <git@volpeon.ink> | 2024-06-27 09:56:02 +0200 |
|---|---|---|
| committer | Volpeon <git@volpeon.ink> | 2024-06-27 09:56:02 +0200 |
| commit | d23a2cf25ccc33f49d73ee3da2f775c0d4fa0784 (patch) | |
| tree | 19e9a649bcf6ca6559ed7ad46b0fd2c23e664521 /tpl/objects | |
| parent | Update (diff) | |
| download | iro-design-d23a2cf25ccc33f49d73ee3da2f775c0d4fa0784.tar.gz iro-design-d23a2cf25ccc33f49d73ee3da2f775c0d4fa0784.tar.bz2 iro-design-d23a2cf25ccc33f49d73ee3da2f775c0d4fa0784.zip | |
Update
Diffstat (limited to 'tpl/objects')
| -rw-r--r-- | tpl/objects/card.pug | 29 | ||||
| -rw-r--r-- | tpl/objects/table.pug | 2 |
2 files changed, 30 insertions, 1 deletions
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 @@ | |||
| 1 | mixin card | ||
| 2 | - const slots = {} | ||
| 3 | |||
| 4 | mixin slot(key) | ||
| 5 | - slots[key] = block | ||
| 6 | |||
| 7 | - | ||
| 8 | block ? block() : undefined | ||
| 9 | |||
| 10 | let classes = { | ||
| 11 | 'o-card': true, | ||
| 12 | } | ||
| 13 | |||
| 14 | if attributes.href | ||
| 15 | a(href=attributes.href class=classes) | ||
| 16 | if slots.body | ||
| 17 | .o-card__body | ||
| 18 | - slots.body() | ||
| 19 | if slots.footer | ||
| 20 | .o-card__footer | ||
| 21 | - slots.footer() | ||
| 22 | else | ||
| 23 | div(class=classes) | ||
| 24 | if slots.body | ||
| 25 | .o-card__body | ||
| 26 | - slots.body() | ||
| 27 | if slots.footer | ||
| 28 | .o-card__footer | ||
| 29 | - 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 | |||
| 5 | 'o-table--flush': attributes.flush, | 5 | 'o-table--flush': attributes.flush, |
| 6 | 'o-table--box': attributes.box, | 6 | 'o-table--box': attributes.box, |
| 7 | 'o-table--interactive': attributes.interactive, | 7 | 'o-table--interactive': attributes.interactive, |
| 8 | 'o-table--50': attributes.size50, | 8 | 'o-table--sm': attributes.sm, |
| 9 | } | 9 | } |
| 10 | 10 | ||
| 11 | table(class=classes) | 11 | table(class=classes) |
