summaryrefslogtreecommitdiffstats
path: root/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'tpl')
-rw-r--r--tpl/index.pug3
-rw-r--r--tpl/objects/navbar.pug30
-rw-r--r--tpl/views/navbar.pug13
3 files changed, 46 insertions, 0 deletions
diff --git a/tpl/index.pug b/tpl/index.pug
index cccfb2a..7d73c75 100644
--- a/tpl/index.pug
+++ b/tpl/index.pug
@@ -24,6 +24,7 @@ include objects/avatar.pug
24include objects/card.pug 24include objects/card.pug
25include objects/popover.pug 25include objects/popover.pug
26include objects/menu.pug 26include objects/menu.pug
27include objects/navbar.pug
27include objects/side-nav.pug 28include objects/side-nav.pug
28include objects/icon-nav.pug 29include objects/icon-nav.pug
29include objects/emoji.pug 30include objects/emoji.pug
@@ -76,6 +77,7 @@ include views/avatar.pug
76include views/card.pug 77include views/card.pug
77include views/popover.pug 78include views/popover.pug
78include views/menu.pug 79include views/menu.pug
80include views/navbar.pug
79include views/side-nav.pug 81include views/side-nav.pug
80include views/icon-nav.pug 82include views/icon-nav.pug
81include views/backdrop.pug 83include views/backdrop.pug
@@ -124,6 +126,7 @@ html
124 +view-side-nav 126 +view-side-nav
125 +view-popover 127 +view-popover
126 +view-menu 128 +view-menu
129 +view-navbar
127 //+view-icon-nav 130 //+view-icon-nav
128 +view-backdrop 131 +view-backdrop
129 //+view-dialog 132 //+view-dialog
diff --git a/tpl/objects/navbar.pug b/tpl/objects/navbar.pug
new file mode 100644
index 0000000..bca8c90
--- /dev/null
+++ b/tpl/objects/navbar.pug
@@ -0,0 +1,30 @@
1include icon.pug
2include status-indicator.pug
3include action-button.pug
4
5mixin navbar
6 -
7 let classes = {
8 'o-navbar': true,
9 'o-navbar--quiet': attributes.quiet,
10 }
11 if (attributes.class) {
12 classes[attributes.class] = true;
13 }
14
15 div(class=classes)&attributes(attributes)
16 block
17
18mixin navbar-item
19 -
20 let classes = {
21 'o-navbar__item': true,
22 'is-selected': attributes.selected,
23 }
24 if (attributes.class) {
25 classes[attributes.class] = true;
26 }
27
28 #{!!attributes.tag ? attributes.tag : 'button'}(class=classes)&attributes(attributes)
29 .o-navbar__item-label
30 block
diff --git a/tpl/views/navbar.pug b/tpl/views/navbar.pug
new file mode 100644
index 0000000..03f1591
--- /dev/null
+++ b/tpl/views/navbar.pug
@@ -0,0 +1,13 @@
1mixin view-navbar
2 +view('navbar', 'Navbar')
3 .c-box
4 +navbar
5 +navbar-item= 'Home'
6 +navbar-item(selected=true)= 'Art'
7 +navbar-item= 'Emojis'
8
9 .c-box
10 +navbar(quiet=true)
11 +navbar-item= 'Home'
12 +navbar-item(selected=true)= 'Art'
13 +navbar-item= 'Emojis'