diff --git a/src/components/BlogPost.vue b/src/components/BlogPost.vue index 7aff06b..af359b4 100644 --- a/src/components/BlogPost.vue +++ b/src/components/BlogPost.vue @@ -62,6 +62,14 @@ export default class BlogPostPreview extends Vue { // Collapse everything that's not this $(`.card:not(.${this.uid})`).accordion('option', {active: false}); + + // Change url + console.log(this.isActive()) + if (!this.isActive()) + { + this.$router.push(`/blog?post=${this.meta.url_name}`) + } + else this.$router.push('/blog') } mounted(): void