mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-27 23:13:01 -04:00
move /slowniki subroutes to full routes
This commit is contained in:
parent
179827e1d0
commit
3a99dfff70
@ -161,10 +161,10 @@
|
|||||||
extras.push(`/${this.config.nouns.route}/${subroute}`);
|
extras.push(`/${this.config.nouns.route}/${subroute}`);
|
||||||
}
|
}
|
||||||
if (this.config.inclusive.enabled) {
|
if (this.config.inclusive.enabled) {
|
||||||
extras.push(`/${this.config.nouns.route}/${this.config.inclusive.route}`);
|
extras.push(`/${this.config.inclusive.route}`);
|
||||||
}
|
}
|
||||||
if (this.config.terminology.enabled) {
|
if (this.config.terminology.enabled) {
|
||||||
extras.push(`/${this.config.nouns.route}/${this.config.terminology.route}`);
|
extras.push(`/${this.config.terminology.route}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
links.push({
|
links.push({
|
||||||
|
@ -1328,13 +1328,13 @@ census:
|
|||||||
spis-2021: 'Raport ze Spisu 2021'
|
spis-2021: 'Raport ze Spisu 2021'
|
||||||
|
|
||||||
redirects:
|
redirects:
|
||||||
- { from: '^/neutratywy$', to: '/slowniki/neutratywy' }
|
- { from: '^/slowniki/neutratywy$', to: '/neutratywy' }
|
||||||
- { from: '^/dukatywy$', to: '/slowniki/dukatywy' }
|
- { from: '^/slowniki/dukatywy$', to: '/dukatywy' }
|
||||||
- { from: '^/osobatywy$', to: '/slowniki/osobatywy' }
|
- { from: '^/slowniki/osobatywy$', to: '/osobatywy' }
|
||||||
- { from: '^/iksatywy$', to: '/slowniki/iksatywy' }
|
- { from: '^/slowniki/iksatywy$', to: '/iksatywy' }
|
||||||
- { from: '^/inkluzywny', to: '/slowniki/inkluzywny' }
|
- { from: '^/slowniki/inkluzywny', to: '/inkluzywny' }
|
||||||
- { from: '^/inkluzywnosc', to: '/slowniki/inkluzywny' }
|
- { from: '^/slowniki/inkluzywnosc', to: '/inkluzywny' }
|
||||||
- { from: '^/terminologia', to: '/slowniki/terminologia' }
|
- { from: '^/slowniki/terminologia', to: '/terminologia' }
|
||||||
- { from: '^/rzeczowniki$', to: '/slowniki' }
|
- { from: '^/rzeczowniki$', to: '/slowniki' }
|
||||||
- { from: '^/slownik$', to: '/slowniki' }
|
- { from: '^/slownik$', to: '/slowniki' }
|
||||||
- { from: '^/s%C5%82ownik$', to: '/slowniki' }
|
- { from: '^/s%C5%82ownik$', to: '/slowniki' }
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
buildRoute(route) {
|
buildRoute(route) {
|
||||||
return `/${this.config.nouns.route}/${route}`;
|
return `/${route}`;
|
||||||
},
|
},
|
||||||
isActiveRoute(route) {
|
isActiveRoute(route) {
|
||||||
let current = decodeURIComponent(this.$route.fullPath).replace(/\/$/, '');
|
let current = decodeURIComponent(this.$route.fullPath).replace(/\/$/, '');
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
buildRoute(route) {
|
buildRoute(route) {
|
||||||
return `/${this.config.nouns.route}/${route}`;
|
return `/${route}`;
|
||||||
},
|
},
|
||||||
isActiveRoute(route) {
|
isActiveRoute(route) {
|
||||||
return decodeURIComponent(this.$route.fullPath).replace(/\/$/, '') === this.buildRoute(route).replace(/\/$/, '');
|
return decodeURIComponent(this.$route.fullPath).replace(/\/$/, '') === this.buildRoute(route).replace(/\/$/, '');
|
||||||
|
@ -188,14 +188,15 @@ export default {
|
|||||||
if (config.nouns.enabled) {
|
if (config.nouns.enabled) {
|
||||||
routes.push({ path: '/' + config.nouns.route, component: resolve(__dirname, 'routes/nouns.vue') });
|
routes.push({ path: '/' + config.nouns.route, component: resolve(__dirname, 'routes/nouns.vue') });
|
||||||
for (let subroute of config.nouns.subroutes || []) {
|
for (let subroute of config.nouns.subroutes || []) {
|
||||||
routes.push({ path: `/${config.nouns.route}/${subroute}`, component: resolve(__dirname, `data/nouns/${subroute}.vue`) });
|
routes.push({ path: `/${subroute}`, component: resolve(__dirname, `data/nouns/${subroute}.vue`) });
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (config.inclusive.enabled) {
|
if (config.inclusive.enabled) {
|
||||||
routes.push({path: `/${config.nouns.route}/${config.inclusive.route}`, component: resolve(__dirname, 'routes/inclusive.vue')});
|
routes.push({path: `/${config.inclusive.route}`, component: resolve(__dirname, 'routes/inclusive.vue')});
|
||||||
}
|
}
|
||||||
if (config.terminology.enabled) {
|
if (config.terminology.enabled) {
|
||||||
routes.push({path: `/${config.nouns.route}/${config.terminology.route}`, component: resolve(__dirname, 'routes/terminology.vue')});
|
routes.push({path: `/${config.terminology.route}`, component: resolve(__dirname, 'routes/terminology.vue')});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.names.enabled) {
|
if (config.names.enabled) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user