From b7c90a420604166cfd1a508419820d8535c73217 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Wed, 2 May 2018 21:32:43 -0700 Subject: [PATCH] add animation for navigation bar indicator (#257) --- routes/_components/Layout.html | 2 + routes/_components/Nav.html | 39 ++------ routes/_components/NavItem.html | 89 ++++++++++++++++--- routes/_store/computations/computations.js | 2 + .../computations/instanceComputations.js | 13 --- routes/_store/computations/navComputations.js | 85 ++++++++++++++++++ routes/_store/observers/navObservers.js | 21 +++++ routes/_store/observers/observers.js | 2 + 8 files changed, 200 insertions(+), 53 deletions(-) create mode 100644 routes/_store/computations/navComputations.js create mode 100644 routes/_store/observers/navObservers.js diff --git a/routes/_components/Layout.html b/routes/_components/Layout.html index e173fa50..a22b5d8a 100644 --- a/routes/_components/Layout.html +++ b/routes/_components/Layout.html @@ -29,6 +29,8 @@ firstTime = false this.refs.container.focus() } + let { page } = this.get() + this.store.set({currentPage: page}) }, store: () => store } diff --git a/routes/_components/Nav.html b/routes/_components/Nav.html index f3eabb5f..b9b9e1fa 100644 --- a/routes/_components/Nav.html +++ b/routes/_components/Nav.html @@ -1,37 +1,16 @@ diff --git a/routes/_components/NavItem.html b/routes/_components/NavItem.html index a08d1ce7..c94ffc39 100644 --- a/routes/_components/NavItem.html +++ b/routes/_components/NavItem.html @@ -3,28 +3,41 @@ aria-current={selected} on:click="onClick(event)" {href} > - {#if name === 'notifications'} + +