Skip to content

Commit

Permalink
Highlight active item in the navbar
Browse files Browse the repository at this point in the history
Solves part of #39
  • Loading branch information
Botffy committed Jul 27, 2021
1 parent 8184c94 commit dc1df2b
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,26 @@ if (process.env.NODE_ENV !== 'production') {
const auth = getAuth(firebaseApp)
auth.useDeviceLanguage()

const router = new VueRouter({ routes: [
{ path: '/info', component: InfoPage },
{ path: '/privacy', component: PrivacyPage },
{ path: '/settings', component: SettingsPage },
{
path: '/(rides|bikes|stations|time)?',
component: StatPage,
children: [
{ path: '/rides', component: BubiRides },
{ path: '/bikes', component: Bikes },
{ path: '/stations', component: StationsPage },
{ path: '/time', component: TimePage },
{ path: '/', component: BubiRides }
]
},
{ path: '*', component: NotFoundPage },
]})
const router = new VueRouter({
linkActiveClass: 'is-active',
routes: [
{ path: '/info', component: InfoPage },
{ path: '/privacy', component: PrivacyPage },
{ path: '/settings', component: SettingsPage },
{
path: '/(rides|bikes|stations|time)?',
component: StatPage,
children: [
{ path: '/rides', component: BubiRides },
{ path: '/bikes', component: Bikes },
{ path: '/stations', component: StationsPage },
{ path: '/time', component: TimePage },
{ path: '/', component: BubiRides }
]
},
{ path: '*', component: NotFoundPage }
]
})

new Vue({
el: '#app',
Expand Down

0 comments on commit dc1df2b

Please sign in to comment.