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