blabla article display and nav
This commit is contained in:
@ -59,7 +59,20 @@ import 'theme/assets/styles/main.scss'
|
||||
router.beforeEach((to, from, next) => {
|
||||
// console.log('router beforeEach to ', to);
|
||||
// commit new title to store
|
||||
store.commit('Common/setPagetitle', to.name != 'home' ? to.name : null)
|
||||
let title = null;
|
||||
switch (to.name) {
|
||||
case 'home':
|
||||
title = null
|
||||
break;
|
||||
case 'article':
|
||||
title = false
|
||||
break;
|
||||
default:
|
||||
title = to.name
|
||||
}
|
||||
if (title !== false) {
|
||||
store.commit('Common/setPagetitle', title)
|
||||
}
|
||||
|
||||
// remove all path related body classes
|
||||
let body_classes = document.querySelector('body').classList;
|
||||
|
Reference in New Issue
Block a user