From 4d8853016f43d6d8ddcaf532d4742dfa0d2e308c Mon Sep 17 00:00:00 2001 From: Volpeon Date: Tue, 19 Nov 2024 07:55:19 +0100 Subject: Navbar: Better icon integration --- tpl/objects/navbar.pug | 11 +++++++++-- tpl/views/navbar.pug | 6 ++++++ 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'tpl') diff --git a/tpl/objects/navbar.pug b/tpl/objects/navbar.pug index bca8c90..5c7642c 100644 --- a/tpl/objects/navbar.pug +++ b/tpl/objects/navbar.pug @@ -26,5 +26,12 @@ mixin navbar-item } #{!!attributes.tag ? attributes.tag : 'button'}(class=classes)&attributes(attributes) - .o-navbar__item-label - block + .o-navbar__item-content + if attributes.icon + +icon(attributes.icon) + = ' ' + span.o-navbar__item-content-text + block + if attributes.postIcon + = ' ' + +icon(attributes.postIcon) diff --git a/tpl/views/navbar.pug b/tpl/views/navbar.pug index 03f1591..345a22b 100644 --- a/tpl/views/navbar.pug +++ b/tpl/views/navbar.pug @@ -11,3 +11,9 @@ mixin view-navbar +navbar-item= 'Home' +navbar-item(selected=true)= 'Art' +navbar-item= 'Emojis' + + .c-box + +navbar(quiet=true) + +navbar-item(selected=true icon="arrow-left")= 'Home' + +navbar-item= 'Art' + +navbar-item= 'Emojis' -- cgit v1.2.3-70-g09d2