[+] Change url when clicking on a blog post
This commit is contained in:
@@ -62,6 +62,14 @@ export default class BlogPostPreview extends Vue
|
|||||||
{
|
{
|
||||||
// Collapse everything that's not this
|
// Collapse everything that's not this
|
||||||
$(`.card:not(.${this.uid})`).accordion('option', {active: false});
|
$(`.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
|
mounted(): void
|
||||||
|
|||||||
Reference in New Issue
Block a user