added default base page

This commit is contained in:
2021-01-19 16:30:14 +01:00
parent a0d1099eae
commit f4174fac16
10 changed files with 102 additions and 68 deletions

View File

@ -140,8 +140,11 @@ import 'theme/assets/styles/main.scss'
if (to.path == '/') {
classes.push('path-home')
} else {
const path_parts = to.path.replace(/^\//, '').split('/')
// TODO: remove language relative prefix from path classes (fr, en, etc)
const path_parts = to.path
.replace(/^\//, '')
// remove language relative prefix from path classes (fr, en, etc)
.replace(/^\D{2,3}\//, '')
.split('/')
for (var i = 0; i < path_parts.length; i++) {
if (i == 0) {
var c = 'path-' + path_parts[i]