update tag

This commit is contained in:
2021-02-09 16:01:27 +02:00
parent 68f1920775
commit 31b3dd6a90
2 changed files with 16 additions and 5 deletions

View File

@@ -1,6 +1,11 @@
<template>
<Layout :hideHeader="true" :disableScroll="true">
<TagFilterHeader :tags="tagTitles" :selected="title" v-if="tagTitles.length > 2"/>
<TagFilterHeader
@resetAll="resetAll"
:tags="tagTitles"
:selected="title"
v-if="tagTitles.length > 2"
/>
<div class="container sm:px-0 mx-auto overflow-x-hidden pt-12">
<div class="mx-4 sm:mx-0">
<h1 class="pb-0 mb-0 text-5xl font-medium capitalize">
@@ -188,7 +193,7 @@ export default {
tags = this.$page.allBlogTag;
}
var res = [{ title: "All", path: path }];
var res = [{ title: "All Tags", path: path }];
tags.edges.forEach((edge) =>
res.push({ title: edge.node.title, path: edge.node.path })
);
@@ -216,6 +221,12 @@ export default {
}
},
},
methods: {
resetAll() {
this.$router.push({ path: "/news" });
},
},
mounted() {
document.addEventListener("click", this.close);
},