summaryrefslogtreecommitdiffstats
path: root/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'tpl')
-rw-r--r--tpl/index.pug3
-rw-r--r--tpl/objects/icon-nav.pug29
-rw-r--r--tpl/objects/menu.pug6
-rw-r--r--tpl/views/icon-nav.pug17
4 files changed, 55 insertions, 0 deletions
diff --git a/tpl/index.pug b/tpl/index.pug
index 4ed1ae3..6565589 100644
--- a/tpl/index.pug
+++ b/tpl/index.pug
@@ -21,6 +21,7 @@ include objects/status-indicator.pug
21include objects/avatar.pug 21include objects/avatar.pug
22include objects/action-menu.pug 22include objects/action-menu.pug
23include objects/menu.pug 23include objects/menu.pug
24include objects/icon-nav.pug
24include objects/backdrop.pug 25include objects/backdrop.pug
25include objects/dialog.pug 26include objects/dialog.pug
26include objects/lightbox.pug 27include objects/lightbox.pug
@@ -64,6 +65,7 @@ include views/status-indicator.pug
64include views/avatar.pug 65include views/avatar.pug
65include views/action-menu.pug 66include views/action-menu.pug
66include views/menu.pug 67include views/menu.pug
68include views/icon-nav.pug
67include views/backdrop.pug 69include views/backdrop.pug
68include views/dialog.pug 70include views/dialog.pug
69include views/lightbox.pug 71include views/lightbox.pug
@@ -101,6 +103,7 @@ html
101 +view-avatar 103 +view-avatar
102 +view-action-menu 104 +view-action-menu
103 +view-menu 105 +view-menu
106 +view-icon-nav
104 +view-backdrop 107 +view-backdrop
105 +view-dialog 108 +view-dialog
106 +view-lightbox 109 +view-lightbox
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
diff --git a/tpl/views/icon-nav.pug b/tpl/views/icon-nav.pug
new file mode 100644
index 0000000..e71229d
--- /dev/null
+++ b/tpl/views/icon-nav.pug
@@ -0,0 +1,17 @@
1mixin view-icon-nav
2 +view('icon-nav', 'Icon nav')
3 .c-box
4 +icon-nav
5 +icon-nav-item('hash')
6 +icon-nav-item('bookmark')(selected=true)
7 +icon-nav-item('tags')
8 +icon-nav-item('cog')(class='u-ml-auto')
9 +icon-nav-item('logout')
10
11 .c-box
12 +icon-nav(vertical=true style={ height: '20em' })
13 +icon-nav-item('hash')
14 +icon-nav-item('bookmark')(selected=true)
15 +icon-nav-item('tags')
16 +icon-nav-item('cog')(class='u-mt-auto')
17 +icon-nav-item('logout')