Add filter
This commit is contained in:
@@ -100,9 +100,9 @@ module.exports = function(api) {
|
||||
|
||||
});
|
||||
|
||||
api.createPages(async ({ graphql, createPage }) => {
|
||||
api.createPages(async({ graphql, createPage }) => {
|
||||
const { data } = await graphql(`{
|
||||
allProjectTag(filter: { title: {in: ["farming"]}}) {
|
||||
allProjectTag(filter: { title: {in: ["tech", "foundation"]}}) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
@@ -124,7 +124,7 @@ module.exports = function(api) {
|
||||
})
|
||||
})
|
||||
|
||||
api.createPages(async ({ graphql, createPage }) => {
|
||||
api.createPages(async({ graphql, createPage }) => {
|
||||
const { data } = await graphql(`{
|
||||
allBlogTag {
|
||||
edges {
|
||||
@@ -148,7 +148,7 @@ module.exports = function(api) {
|
||||
})
|
||||
})
|
||||
|
||||
api.createPages(async ({ graphql, createPage }) => {
|
||||
api.createPages(async({ graphql, createPage }) => {
|
||||
const { data } = await graphql(`{
|
||||
allNewsTag {
|
||||
edges {
|
||||
@@ -180,9 +180,9 @@ module.exports = function(api) {
|
||||
private: private
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
api.createPages(({ createPage }) => {
|
||||
api.createPages(({ createPage }) => {
|
||||
createPage({
|
||||
path: '/team',
|
||||
component: './src/templates/Team.vue',
|
||||
@@ -190,9 +190,9 @@ api.createPages(({ createPage }) => {
|
||||
private: private
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
api.createPages(({ createPage }) => {
|
||||
api.createPages(({ createPage }) => {
|
||||
createPage({
|
||||
path: '/search',
|
||||
component: './src/templates/Search.vue',
|
||||
@@ -200,7 +200,7 @@ api.createPages(({ createPage }) => {
|
||||
private: private
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
@@ -36,7 +36,7 @@
|
||||
<page-query>
|
||||
|
||||
query($page: Int){
|
||||
entries: allBlog(perPage: 10, page: $page, sortBy: "created", order: DESC, filter: {category: { id: {in: ["farming"]}}}) @paginate{
|
||||
entries: allBlog(perPage: 10, page: $page, sortBy: "created", order: DESC, filter: {category: { id: {in: ["tech", "foundation"]}}}) @paginate{
|
||||
totalCount
|
||||
pageInfo {
|
||||
totalPages
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<page-query>
|
||||
query($page: Int){
|
||||
entries: allNews(perPage: 10, page: $page, sortBy: "created", order: DESC, filter: {category: { id: {in: ["farming"]}}}) @paginate{
|
||||
entries: allNews(perPage: 10, page: $page, sortBy: "created", order: DESC, filter: {category: { id: {in: ["tech", "foundation"]}}}) @paginate{
|
||||
totalCount
|
||||
pageInfo {
|
||||
totalPages
|
||||
@@ -67,7 +67,7 @@ query($page: Int){
|
||||
}
|
||||
}
|
||||
|
||||
topics: allNewsTag{
|
||||
topics: allNewsTag {
|
||||
edges{
|
||||
node{
|
||||
title
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<page-query>
|
||||
query ($private: Int){
|
||||
entries: allProject (sortBy: "rank", order: DESC, filter: { private: { ne: $private }, tags: { id: {in: ["farming"]}}}){
|
||||
entries: allProject (sortBy: "rank", order: DESC, filter: { private: { ne: $private }, tags: { id: {in: ["tech", "foundation"]}}}){
|
||||
totalCount
|
||||
edges {
|
||||
node {
|
||||
@@ -39,7 +39,7 @@ query ($private: Int){
|
||||
}
|
||||
}
|
||||
|
||||
tags: allProjectTag (filter: { title: {in: ["farming"]}}) {
|
||||
tags: allProjectTag (filter: { title: {in: ["tech", "foundation"]}}) {
|
||||
edges{
|
||||
node{
|
||||
id
|
||||
@@ -70,5 +70,8 @@ export default {
|
||||
return res;
|
||||
},
|
||||
},
|
||||
mounted(){
|
||||
console.log(this.$page)
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
tags: allProjectTag (filter: { title: {in: ["farming"]}}) {
|
||||
tags: allProjectTag (filter: { title: {in: ["tech", "foundation"]}}) {
|
||||
edges{
|
||||
node{
|
||||
id
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<page-query>
|
||||
|
||||
query ($private: Int){
|
||||
entries: allProject (sortBy: "rank", order: DESC, filter: { private: { ne: $private }}){
|
||||
entries: allProject (sortBy: "rank", order: DESC, filter: { private: { ne: $private }}, tags: { id: {in: ["tech", "foundation"]}}){
|
||||
totalCount
|
||||
edges {
|
||||
node {
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<page-query>
|
||||
|
||||
query ($private: Int){
|
||||
projects: allProject (filter: { private: { ne: $private }, tags: { id: {in: ["farming"]}}}){
|
||||
projects: allProject (filter: { private: { ne: $private }, tags: { id: {in: ["tech", "foundation"]}}}){
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
allProjectTag(filter: { title: {in: ["farming"]}}){
|
||||
allProjectTag(filter: { title: {in: ["tech", "foundation"]}}){
|
||||
edges{
|
||||
node{
|
||||
id
|
||||
|
||||
Reference in New Issue
Block a user