Add filters
This commit is contained in:
@@ -102,7 +102,7 @@ module.exports = function(api) {
|
||||
|
||||
api.createPages(async({ graphql, createPage }) => {
|
||||
const { data } = await graphql(`{
|
||||
allProjectTag(filter: { title: {in: ["foundation"]}}) {
|
||||
allProjectTag(filter: { title: {in: ["blockchain", "experience", "technology", "farming", "community", "infrastructure", "impact"]}}) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<page-query>
|
||||
|
||||
query($page: Int){
|
||||
entries: allBlog(perPage: 10, page: $page, sortBy: "created", order: DESC, filter: {category: { id: {in: ["tech", "foundation"]}}}) @paginate{
|
||||
entries: allBlog(perPage: 10, page: $page, sortBy: "created", order: DESC, filter: {category: { id: {in: ["blockchain", "experience", "technology", "farming", "community", "infrastructure", "impact"]}}}) @paginate{
|
||||
totalCount
|
||||
pageInfo {
|
||||
totalPages
|
||||
@@ -69,7 +69,7 @@ query($page: Int){
|
||||
}
|
||||
}
|
||||
|
||||
topics: allBlogTag{
|
||||
topics: allBlogTag(filter: { title: {in: ["blockchain", "experience", "technology", "farming", "community", "infrastructure", "impact"]}}) {
|
||||
edges{
|
||||
node{
|
||||
title
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<page-query>
|
||||
query($page: Int){
|
||||
entries: allNews(perPage: 10, page: $page, sortBy: "created", order: DESC, filter: {category: { id: {in: ["tech", "foundation"]}}}) @paginate{
|
||||
entries: allNews(perPage: 10, page: $page, sortBy: "created", order: DESC, filter: {tags: { id: {in: ["blockchain", "experience", "technology", "farming", "community", "infrastructure", "impact"]}}}) @paginate{
|
||||
totalCount
|
||||
pageInfo {
|
||||
totalPages
|
||||
@@ -67,7 +67,7 @@ query($page: Int){
|
||||
}
|
||||
}
|
||||
|
||||
topics: allNewsTag {
|
||||
topics: allNewsTag(filter: { title: {in: ["blockchain", "experience", "technology", "farming", "community", "infrastructure", "impact"]}}) {
|
||||
edges{
|
||||
node{
|
||||
title
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
<template>
|
||||
<Layout :hideHeader="true" :disableScroll="true">
|
||||
<TagFilterHeader :tags="memberships" :selected="$page.membership.title" v-if="$page.allMembership.edges.length > 1"/>
|
||||
<TagFilterHeader
|
||||
:tags="memberships"
|
||||
:selected="$page.membership.title"
|
||||
v-if="$page.allMembership.edges.length > 1"
|
||||
/>
|
||||
<div class="container sm:pxi-0 mx-auto mt-8 overflow-x-hidden">
|
||||
<div class="mx-4 sm:mx-0">
|
||||
<h1 class="pb-0 mb-0 text-5xl font-medium capitalize">
|
||||
{{ $page.membership.title }}
|
||||
{{ $page.membership.title.replace("_", " ") }}
|
||||
</h1>
|
||||
<p class="text-gray-700 text-xl">
|
||||
<span class="self-center"
|
||||
@@ -59,7 +63,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
allMembership(filter: {title: {in: ["foundation", "tech"]}}){
|
||||
allMembership(filter: {title: {in: ["cofounders", "tech", "foundation", "ambassadors", "matchmakers", "farmers", "aci_members", "partners", "wisdom_council", "technology_council", "grid_guardians"]}}){
|
||||
edges{
|
||||
node{
|
||||
id
|
||||
|
||||
@@ -39,7 +39,7 @@ query ($private: Int){
|
||||
}
|
||||
}
|
||||
|
||||
tags: allProjectTag (filter: { title: {in: ["foundation"]}}) {
|
||||
tags: allProjectTag (filter: { title: {in: ["blockchain", "experience", "technology", "farming", "community", "infrastructure", "impact"]}}) {
|
||||
edges{
|
||||
node{
|
||||
id
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
allProjectTag(filter: { title: {in: ["tech", "foundation"]}}){
|
||||
allProjectTag(filter: { title: {in: ["blockchain", "experience", "technology", "farming", "community", "infrastructure", "impact"]}}){
|
||||
edges{
|
||||
node{
|
||||
id
|
||||
@@ -139,7 +139,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
allNewsTag{
|
||||
allNewsTag(filter: { title: {in: ["blockchain", "experience", "technology", "farming", "community", "infrastructure", "impact"]}}){
|
||||
edges{
|
||||
node{
|
||||
id
|
||||
@@ -149,7 +149,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
allBlogTag{
|
||||
allBlogTag(filter: { title: {in: ["blockchain", "experience", "technology", "farming", "community", "infrastructure", "impact"]}}){
|
||||
edges{
|
||||
node{
|
||||
id
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<Layout>
|
||||
<!-- <TagFilterHeader :tags="memberships" selected="all" v-if="$page.memberships.edges.length > 1"/> -->
|
||||
<TagFilterHeader :tags="memberships" selected="all" v-if="$page.memberships.edges.length > 1"/>
|
||||
<div class="container sm:pxi-0 mx-auto mt-8 overflow-x-hidden">
|
||||
<div class="flex flex-wrap with-large pt-8 pb-8 mx-4 sm:-mx-4">
|
||||
<PostListItem
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<page-query>
|
||||
query ($private: Int){
|
||||
entries: allPerson (sortBy: "rank", order: DESC, filter: { private: { ne: $private }}){
|
||||
entries: allPerson (sortBy: "rank", order: DESC, filter: { private: { ne: $private }, memberships: { id: {in: ["cofounders", "tech", "foundation", "ambassadors", "matchmakers", "farmers", "aci_members", "partners", "wisdom_council", "technology_council", "grid_guardians"]}}}){
|
||||
totalCount
|
||||
edges {
|
||||
node {
|
||||
@@ -35,15 +35,15 @@ query ($private: Int){
|
||||
}
|
||||
}
|
||||
|
||||
# memberships: allMembership(filter: {title: {in: ["foundation", "tech"]}}){
|
||||
# edges{
|
||||
# node{
|
||||
# id
|
||||
# title
|
||||
# path
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
memberships: allMembership(filter: {title: {in:["cofounders", "tech", "foundation", "ambassadors", "matchmakers", "farmers", "aci_members", "partners", "wisdom_council", "technology_council", "grid_guardians"]}}){
|
||||
edges{
|
||||
node{
|
||||
id
|
||||
title
|
||||
path
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</page-query>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user