diff --git a/packages/@okta/vuepress-site/.vuepress/enhanceApp.js b/packages/@okta/vuepress-site/.vuepress/enhanceApp.js
index 19c39c7da34..9b9058fa2d3 100755
--- a/packages/@okta/vuepress-site/.vuepress/enhanceApp.js
+++ b/packages/@okta/vuepress-site/.vuepress/enhanceApp.js
@@ -1,5 +1,10 @@
var redirectsJson = require('./redirects.json');
+import pageComponents from '@internal/page-components'
-export default ({ router }) => {
+export default ({ router, Vue }) => {
router.addRoutes(redirectsJson)
+
+ for (const [name, component] of Object.entries(pageComponents)) {
+ Vue.component(name, component)
+ }
}
diff --git a/packages/@okta/vuepress-theme-default/layouts/Quickstart.vue b/packages/@okta/vuepress-theme-default/layouts/Quickstart.vue
index 508b1c9bda7..159ea276937 100644
--- a/packages/@okta/vuepress-theme-default/layouts/Quickstart.vue
+++ b/packages/@okta/vuepress-theme-default/layouts/Quickstart.vue
@@ -28,9 +28,7 @@
-
+
Server Setup
@@ -56,9 +54,7 @@
-
+
@@ -68,8 +64,6 @@
-
-
@@ -86,13 +80,7 @@
activeClient: null,
activeServer: null,
activeFramework: null,
- activeTab: null,
- clientContentUrl: null,
- serverContentUrl: null,
- clientContentLoading: true,
- serverContentLoading: true,
- clientContent: "",
- serverContent: ""
+ activeTab: null
}
},
created: function () {
@@ -131,17 +119,28 @@
})
return activeServerFrameworks.frameworks
},
+
activeClientComponent: function () {
let component = this.$site.pages.find((page) => {
return page.regularPath.startsWith('/quickstart-fragments/'+this.activeClient+'/default-example')
})
+ return component.key
+ },
+
+ activeServerComponent: function () {
+ let client = this.$themeConfig.quickstarts.clients.filter((client) => {
+ return client.name === this.activeClient
+ })[0];
+ let component = this.$site.pages.find((page) => {
+ return page.regularPath.startsWith('/quickstart-fragments/' + this.activeServer + '/' + this.activeFramework + '-' + client.serverExampleType + '/')
+ })
+
return component.key
}
},
watch: {
activeClient: function () {
- this.loadClientContent()
window.location.hash = '/'+this.activeClient+'/'+this.activeServer+'/'+this.activeFramework
},
activeServer: function () {
@@ -178,11 +177,9 @@
this.activeFramework = frameworkToSet
- this.loadServerContent()
window.location.hash = '/'+this.activeClient+'/'+this.activeServer+'/'+this.activeFramework
},
activeFramework: function () {
- this.loadServerContent()
window.location.hash = '/'+this.activeClient+'/'+this.activeServer+'/'+this.activeFramework
}
},
@@ -201,32 +198,6 @@
},
scrollTo: function (element) {
window.scrollTo(0, document.querySelectorAll(element)[0].offsetTop - 150)
- },
-
- loadClientContent: function () {
- this.clientContentLoading = true
-
- this.clientContentUrl = '/quickstart-fragments/' + this.activeClient + '/default-example/'
-
-
- document.getElementById('clientContentIframe').onload = () => {
- this.clientContentLoading = false
- this.clientContent = document.getElementById('clientContentIframe').contentDocument.querySelector('.PageContent-main').innerHTML
- }
- },
-
- loadServerContent: function () {
- this.serverContentLoading = true
- let client = this.$themeConfig.quickstarts.clients.filter((client) => {
- return client.name === this.activeClient
- })[0];
-
- this.serverContentUrl = '/quickstart-fragments/' + this.activeServer + '/' + this.activeFramework + '-' + client.serverExampleType + '/'
-
- document.getElementById('serverContentIframe').onload = () => {
- this.serverContentLoading = false
- this.serverContent = document.getElementById('serverContentIframe').contentDocument.querySelector('.PageContent-main').innerHTML
- }
}
}
}