From 4154c091399151aeebf12b828fc26ed41fff220f Mon Sep 17 00:00:00 2001 From: ManikanthDindigala <dindigala@sub.uni-goettingen.de> Date: Fri, 6 Aug 2021 11:52:05 +0200 Subject: [PATCH] fix: navigating from tido homepage to website --- src/.vuepress/components/Bar.vue | 14 +++++--------- src/.vuepress/components/Cta.vue | 11 ++++++++--- src/.vuepress/theme/layouts/Edition.vue | 4 +++- src/.vuepress/theme/layouts/Home.vue | 4 +++- src/.vuepress/theme/layouts/Layout.vue | 4 +++- src/de/index.md | 4 +++- src/index.md | 4 +++- 7 files changed, 28 insertions(+), 17 deletions(-) diff --git a/src/.vuepress/components/Bar.vue b/src/.vuepress/components/Bar.vue index 441d5b4..ed845d2 100644 --- a/src/.vuepress/components/Bar.vue +++ b/src/.vuepress/components/Bar.vue @@ -53,7 +53,7 @@ <v-list-item v-for="(item, index) in editions" :key="index" - :href="item.to + path" + :href="item.to + getPath()" > <v-list-item-title>{{ item.title }}</v-list-item-title> </v-list-item> @@ -90,15 +90,11 @@ export default { { title: 'Edition guidelines', to: '/editionguidelines.html' }, { title: 'Related Literature', to: '/relatedliterature.html' }, ], - origin:'', }), - mounted(){ - this.origin = window?.location?.origin; - }, - computed:{ - path(){ - return this.origin + this.$route.path; + methods:{ + getPath(){ + return window?.location?.origin + window?.location?.pathname; } - }, + } } </script> diff --git a/src/.vuepress/components/Cta.vue b/src/.vuepress/components/Cta.vue index b6b765b..7394fd8 100755 --- a/src/.vuepress/components/Cta.vue +++ b/src/.vuepress/components/Cta.vue @@ -9,7 +9,7 @@ > <a class="white--text text-overline text-decoration-none text-uppercase" - :href="editionSyriac.to" + :href="editionSyriac.to + getPath()" :title="editionSyriac.title" role="link" tabindex="0" @@ -26,7 +26,7 @@ > <a class="white--text text-overline text-decoration-none text-uppercase" - :href="editionArabic.to" + :href="editionArabic.to + getPath()" :title="editionArabic.title" role="link" tabindex="0" @@ -45,6 +45,11 @@ export default { data: () => ({ editionSyriac: editionLinks[0], editionArabic: editionLinks[1] - }) + }), + methods:{ + getPath(){ + return window?.location?.origin + window?.location?.pathname; + } + } } </script> diff --git a/src/.vuepress/theme/layouts/Edition.vue b/src/.vuepress/theme/layouts/Edition.vue index 895bad9..ed25bf4 100644 --- a/src/.vuepress/theme/layouts/Edition.vue +++ b/src/.vuepress/theme/layouts/Edition.vue @@ -1,6 +1,8 @@ <template> <v-app> - <Bar/> + <client-only> + <Bar/> + </client-only> <v-main> <Content/> </v-main> diff --git a/src/.vuepress/theme/layouts/Home.vue b/src/.vuepress/theme/layouts/Home.vue index 58a7c70..b26451b 100644 --- a/src/.vuepress/theme/layouts/Home.vue +++ b/src/.vuepress/theme/layouts/Home.vue @@ -1,6 +1,8 @@ <template> <v-app> - <Bar/> + <client-only> + <Bar/> + </client-only> <v-main> <v-container> <Content/> diff --git a/src/.vuepress/theme/layouts/Layout.vue b/src/.vuepress/theme/layouts/Layout.vue index 58a7c70..b26451b 100644 --- a/src/.vuepress/theme/layouts/Layout.vue +++ b/src/.vuepress/theme/layouts/Layout.vue @@ -1,6 +1,8 @@ <template> <v-app> - <Bar/> + <client-only> + <Bar/> + </client-only> <v-main> <v-container> <Content/> diff --git a/src/de/index.md b/src/de/index.md index 974d62a..044cea8 100755 --- a/src/de/index.md +++ b/src/de/index.md @@ -14,7 +14,9 @@ Lorem ipsum dolor sit amut.{.body-1} ## Editions {.text-h3 .mb-4 .secondary--text} -<Cta/> +<client-only> + <Cta/> +</client-only> ## Contact {.text-h3 .mb-4 .secondary--text} diff --git a/src/index.md b/src/index.md index fa767d5..a7b78a7 100755 --- a/src/index.md +++ b/src/index.md @@ -16,7 +16,9 @@ The edition focuses on the textual and literary analysis of the Syriac and Arabi ## Collections {.text-h3 .mb-4 .secondary--text} -<Cta/> +<client-only> + <Cta/> +</client-only> ## Contact {.text-h3 .mb-4 .secondary--text} -- GitLab