diff options
author | Volpeon <git@volpeon.ink> | 2024-11-17 15:51:24 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2024-11-17 15:51:24 +0100 |
commit | 4ef7ba48a68980c126b89bf5ba5a9ddac804f88f (patch) | |
tree | d0351997b3823d13c0cc94e717420dedecd6d65d /tpl | |
parent | Fix heading color (diff) | |
download | iro-design-4ef7ba48a68980c126b89bf5ba5a9ddac804f88f.tar.gz iro-design-4ef7ba48a68980c126b89bf5ba5a9ddac804f88f.tar.bz2 iro-design-4ef7ba48a68980c126b89bf5ba5a9ddac804f88f.zip |
Add navbar
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/index.pug | 3 | ||||
-rw-r--r-- | tpl/objects/navbar.pug | 30 | ||||
-rw-r--r-- | tpl/views/navbar.pug | 13 |
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 | |||
24 | include objects/card.pug | 24 | include objects/card.pug |
25 | include objects/popover.pug | 25 | include objects/popover.pug |
26 | include objects/menu.pug | 26 | include objects/menu.pug |
27 | include objects/navbar.pug | ||
27 | include objects/side-nav.pug | 28 | include objects/side-nav.pug |
28 | include objects/icon-nav.pug | 29 | include objects/icon-nav.pug |
29 | include objects/emoji.pug | 30 | include objects/emoji.pug |
@@ -76,6 +77,7 @@ include views/avatar.pug | |||
76 | include views/card.pug | 77 | include views/card.pug |
77 | include views/popover.pug | 78 | include views/popover.pug |
78 | include views/menu.pug | 79 | include views/menu.pug |
80 | include views/navbar.pug | ||
79 | include views/side-nav.pug | 81 | include views/side-nav.pug |
80 | include views/icon-nav.pug | 82 | include views/icon-nav.pug |
81 | include views/backdrop.pug | 83 | include 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 @@ | |||
1 | include icon.pug | ||
2 | include status-indicator.pug | ||
3 | include action-button.pug | ||
4 | |||
5 | mixin 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 | |||
18 | mixin 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 @@ | |||
1 | mixin 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' | ||