summaryrefslogtreecommitdiffstats
path: root/tpl
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2024-06-27 09:56:02 +0200
committerVolpeon <git@volpeon.ink>2024-06-27 09:56:02 +0200
commitd23a2cf25ccc33f49d73ee3da2f775c0d4fa0784 (patch)
tree19e9a649bcf6ca6559ed7ad46b0fd2c23e664521 /tpl
parentUpdate (diff)
downloadiro-design-d23a2cf25ccc33f49d73ee3da2f775c0d4fa0784.tar.gz
iro-design-d23a2cf25ccc33f49d73ee3da2f775c0d4fa0784.tar.bz2
iro-design-d23a2cf25ccc33f49d73ee3da2f775c0d4fa0784.zip
Update
Diffstat (limited to 'tpl')
-rw-r--r--tpl/index.pug3
-rw-r--r--tpl/objects/card.pug29
-rw-r--r--tpl/objects/table.pug2
-rw-r--r--tpl/views/alert.pug6
-rw-r--r--tpl/views/card.pug9
-rw-r--r--tpl/views/table.pug2
6 files changed, 46 insertions, 5 deletions
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
21include objects/overflow-button.pug 21include objects/overflow-button.pug
22include objects/status-indicator.pug 22include objects/status-indicator.pug
23include objects/avatar.pug 23include objects/avatar.pug
24include objects/card.pug
24include objects/popover.pug 25include objects/popover.pug
25include objects/menu.pug 26include objects/menu.pug
26include objects/side-nav.pug 27include objects/side-nav.pug
@@ -72,6 +73,7 @@ include views/action-button.pug
72include views/overflow-button.pug 73include views/overflow-button.pug
73include views/status-indicator.pug 74include views/status-indicator.pug
74include views/avatar.pug 75include views/avatar.pug
76include views/card.pug
75include views/popover.pug 77include views/popover.pug
76include views/menu.pug 78include views/menu.pug
77include views/side-nav.pug 79include views/side-nav.pug
@@ -118,6 +120,7 @@ html
118 +view-overflow-button 120 +view-overflow-button
119 +view-status-indicator 121 +view-status-indicator
120 +view-avatar 122 +view-avatar
123 +view-card
121 +view-side-nav 124 +view-side-nav
122 +view-popover 125 +view-popover
123 +view-menu 126 +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 @@
1mixin 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)
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
3 .c-box 3 .c-box
4 +alert= loremIpsum 4 +alert= loremIpsum
5 br 5 br
6 +alert('primary')= loremIpsum 6 +alert('accent')= loremIpsum
7 br 7 br
8 +alert('error')= loremIpsum 8 +alert('negative')= loremIpsum
9 br 9 br
10 +alert('success')= loremIpsum 10 +alert('positive')= loremIpsum
11 br 11 br
12 +alert('warning')= loremIpsum 12 +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 @@
1mixin view-card
2 +view('card', 'Card')
3 .c-box
4 +card(href='#')
5 +slot('body')
6 h1= 'XS Heading'
7 p= loremIpsum
8 +slot('footer')
9 = '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
76 +table-cell= 'Row 4,3' 76 +table-cell= 'Row 4,3'
77 77
78 .c-box 78 .c-box
79 +table(box=true, size50=true) 79 +table(box=true sm=true)
80 +table-head 80 +table-head
81 +table-row 81 +table-row
82 +table-head-cell= 'Title' 82 +table-head-cell= 'Title'