diff --git a/src/.vuepress/components/Bar.vue b/src/.vuepress/components/Bar.vue index 55a43b1f73ab544a38bad8b8d7d31e9055e42d8e..051a2ce1966d24a4300b46eb8d1131005df94c8f 100644 --- a/src/.vuepress/components/Bar.vue +++ b/src/.vuepress/components/Bar.vue @@ -78,6 +78,7 @@ <script> import editions from "../utilities/editionLinks"; +import pathUrl from "../mixin/pathUrl.js" export default { data: () => ({ @@ -91,10 +92,8 @@ export default { { title: 'Related Literature', to: '/relatedliterature.html' }, ], }), - computed: { - getPath(){ - return window?.location?.origin + '/' + window?.location?.pathname.replace(this.$route.path,''); - } - } + mixins: [ + pathUrl + ] } </script> diff --git a/src/.vuepress/components/Cta.vue b/src/.vuepress/components/Cta.vue index 347104f27714c237441749da1728089066dd48f2..80c50dde9508f840b1d07bc4d3491471adde102d 100755 --- a/src/.vuepress/components/Cta.vue +++ b/src/.vuepress/components/Cta.vue @@ -40,16 +40,15 @@ </template> <script> import editionLinks from "../utilities/editionLinks"; +import pathUrl from "../mixin/pathUrl.js" export default { data: () => ({ editionSyriac: editionLinks[0], editionArabic: editionLinks[1] }), - computed: { - getPath(){ - return window?.location?.origin + '/' + window?.location?.pathname.replace(this.$route.path,''); - } - } + mixins: [ + pathUrl + ] } </script> diff --git a/src/.vuepress/mixin/pathUrl.js b/src/.vuepress/mixin/pathUrl.js new file mode 100644 index 0000000000000000000000000000000000000000..53700806bf32976be50d1a17a248db025506ca4b --- /dev/null +++ b/src/.vuepress/mixin/pathUrl.js @@ -0,0 +1,7 @@ +export default { + computed:{ + getPath() { + return window?.location?.origin + '/' + window?.location?.pathname.replace(this.$route.path,''); + } + } +}