blabla article display and nav

This commit is contained in:
2019-07-25 21:23:23 +02:00
parent f2d8c15c25
commit f5e18e9c20
12 changed files with 454 additions and 112 deletions

View File

@ -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;