Newer
Older
import VueBodyClass from 'vue-body-class';
import Home from '../views/Home.vue';
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () =>
import(/* webpackChunkName: "services" */ '@/views/Products.vue'),
title: 'Platform One | Products',
bodyClass: 'products-page',
breadcrumb: 'Products',
},
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () =>
import(/* webpackChunkName: "services" */ '@/views/Services.vue'),
title: 'Platform One | Services',
bodyClass: 'services-page',
breadcrumb: 'Services',
},
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () =>
import(/* webpackChunkName: "who-we-are" */ '@/views/WhoWeAre.vue'),
title: 'Platform One | Who We Are',
bodyClass: 'who-we-are-page',
breadcrumb: 'Who We Are',
},
{
path: '/who-we-are/leadership',
name: 'Leadership',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () =>
import(/* webpackChunkName: "who-we-are" */ '@/views/Leadership.vue'),
meta: {
title: 'Platform One | Who We Are | Leadership',
bodyClass: 'leadership-page',
breadcrumb: 'Leadership Team',
},
},
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
{
path: '/products/abms-adce/onboarding/3-day-workshop',
name: '3DayWorkshop',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () =>
import(
/* webpackChunkName: "3-day-workshop" */ '@/views/3DayWorkshop.vue'
),
meta: {
title:
'Platform One | Products | The Party Bus Onboarding | 3 Day Workshop',
bodyClass: '3-day-workshop-page',
breadcrumb: '3 Day Workshop',
},
},
{
path: '/products/big-bang/onboarding/gbsd-workshop',
name: 'GBSDWorkshop',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () =>
import(
/* webpackChunkName: "GBSD-workshop" */ '@/views/GBSDWorkshop.vue'
),
meta: {
title:
'Platform One | Products | The Party Bus Onboarding | GBSD Workshop',
bodyClass: 'gbsd-workshop-page',
breadcrumb: 'GBSD Workshop',
},
},
path: '/products/abms-adce',
name: 'ADCE',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "adce" */ '@/views/ADCE.vue'),
meta: {
title: 'Platform One | Products | The Party Bus',
bodyClass: 'adce-page',
breadcrumb: 'The Party Bus',
},
},
{ path: '/partybus-onboarding', redirect: '/products/abms-adce/onboarding' },
{
path: '/products/abms-adce/onboarding',
name: 'ADCEOnboarding',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () =>
import(
/* webpackChunkName: "adce-onboarding" */ '@/views/ADCEOnboarding.vue'
title: 'Platform One | Products | The Party Bus Onboarding',
bodyClass: 'adce-onboarding-page',
breadcrumb: 'Onboarding',
},
path: '/products/abms-adce/onboarding/faqs',
name: 'ADCEOnboardingFAQs',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
/* webpackChunkName: "adce-onboarding-faqs" */ '@/views/ADCEOnboardingFAQs.vue'
title: 'Platform One | Products | The Party Bus Onboarding FAQs',
bodyClass: 'adce-onboarding-faqs-page',
breadcrumb: 'FAQs',
},
{ path: '/bigbangonboarding', redirect: '/products/big-bang/onboarding' },
{ path: '/bigbang-onboarding', redirect: '/products/big-bang/onboarding' },
path: '/products/big-bang/onboarding',
name: 'BigBangOnboarding',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () =>
import(
/* webpackChunkName: "big-bang-onboarding" */ '@/views/BigBangOnboarding.vue'
title: 'Platform One | Products | Big Bang Onboarding',
bodyClass: 'big-bang-onboarding-page',
breadcrumb: 'Big Bang Onboarding',
},
{ path: '/bigbang', redirect: '/products/big-bang' },
{ path: '/big-bang', redirect: '/products/big-bang' },
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () =>
import(/* webpackChunkName: "big-bang" */ '@/views/BigBang.vue'),
title: 'Platform One | Products | Big Bang',
bodyClass: 'big-bang-page',
breadcrumb: 'Big Bang',
},
// route level code-splitting
// this generates a separate chunk (ContactUs.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () =>
import(/* webpackChunkName: "ContactUs" */ '@/views/ContactUs.vue'),
title: 'Platform One | Contact Us',
bodyClass: 'contact-us-page',
breadcrumb: 'Contact Us',
},
},
];
const router = new VueRouter({
base: process.env.BASE_URL,
routes,
scrollBehavior(to, from, savedPosition) {
if (savedPosition) {
return savedPosition;
}
if (to.hash) {
return {
// This callback runs before every route change, including on page load.
router.beforeEach((to, from, next) => {
// This goes through the matched routes from last to first, finding the closest route with a title.
// eg. if we have /some/deep/nested/route and /some, /deep, and /nested have titles, nested's will be chosen.
const nearestWithTitle = to.matched
.slice()
.reverse()