summaryrefslogtreecommitdiffstats
path: root/tpl/objects
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/objects')
-rw-r--r--tpl/objects/icon-nav.pug29
-rw-r--r--tpl/objects/menu.pug6
2 files changed, 35 insertions, 0 deletions
diff --git a/tpl/objects/icon-nav.pug b/tpl/objects/icon-nav.pug
new file mode 100644
index 0000000..6f45bf6
--- /dev/null
+++ b/tpl/objects/icon-nav.pug
@@ -0,0 +1,29 @@
1include icon.pug
2include status-indicator.pug
3include action-button.pug
4
5mixin icon-nav
6 -
7 let classes = {
8 'o-icon-nav': true,
9 'o-icon-nav--vertical': attributes.vertical,
10 }
11 if (attributes.class) {
12 classes[attributes.class] = true;
13 }
14
15 div(class=classes)&attributes(attributes)
16 block
17
18mixin icon-nav-item(icon)
19 -
20 let classes = {
21 'o-icon-nav__item': true,
22 'is-selected': attributes.selected,
23 }
24 if (attributes.class) {
25 classes[attributes.class] = true;
26 }
27
28 button(class=classes)&attributes(attributes)
29 +icon(icon)(block=true)
diff --git a/tpl/objects/menu.pug b/tpl/objects/menu.pug
index c6e8223..f9d59b8 100644
--- a/tpl/objects/menu.pug
+++ b/tpl/objects/menu.pug
@@ -7,6 +7,9 @@ mixin menu
7 let classes = { 7 let classes = {
8 'o-menu': true, 8 'o-menu': true,
9 } 9 }
10 if (attributes.class) {
11 classes[attributes.class] = true;
12 }
10 13
11 div(class=classes)&attributes(attributes) 14 div(class=classes)&attributes(attributes)
12 block 15 block
@@ -17,6 +20,9 @@ mixin menu-item
17 'o-menu__item': true, 20 'o-menu__item': true,
18 'is-selected': attributes.selected, 21 'is-selected': attributes.selected,
19 } 22 }
23 if (attributes.class) {
24 classes[attributes.class] = true;
25 }
20 26
21 #{!!attributes.tag ? attributes.tag : 'button'}(class=classes)&attributes(attributes) 27 #{!!attributes.tag ? attributes.tag : 'button'}(class=classes)&attributes(attributes)
22 .l-card.l-card--flush.l-card--75 28 .l-card.l-card--flush.l-card--75