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/objects | |
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/objects')
-rw-r--r-- | tpl/objects/navbar.pug | 30 |
1 files changed, 30 insertions, 0 deletions
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 | ||