This commit is contained in:
hamdy
2020-11-22 17:04:57 +02:00
parent fc42c04f7a
commit ed5cfdbeb4
3 changed files with 82 additions and 0 deletions

View File

@@ -10,6 +10,11 @@
"link": "/people", "link": "/people",
"external": false "external": false
}, },
{
"name": "Overview",
"link": "/overview",
"external": false
},
{ {
"name": "News", "name": "News",
"link": "/news", "link": "/news",

View File

@@ -87,6 +87,16 @@ module.exports = function (api) {
}) })
}) })
api.createPages(({ createPage }) => {
createPage({
path: '/overview',
component: './src/templates/Overview.vue',
context: {
private: private
}
})
})
api.createPages(async ({ api.createPages(async ({
graphql, graphql,
createPage createPage

View File

@@ -0,0 +1,67 @@
<template>
<Layout>
<div class="container sm:pxi-0 mx-auto overflow-x-hidden">
<div class="flex flex-wrap with-large pt-8 pb-8 mx-4 sm:-mx-4">
<PostListItem v-for="edge in $page.entries.edges" :key="edge.node.id" :record="edge.node" />
</div>
</div>
</Layout>
</template>
<page-query>
query ($private: Int){
entries: allProject (sortBy: "rank", order: DESC, filter: { private: { ne: $private }}){
totalCount
edges {
node {
title
path
members {
id
name
image(width:64, height:64, fit:inside)
path
},
tags {
id
title
path
}
rank
linkedin
startDate : startdate(format:"MM YYYY")
humanTime : created(format:"DD MMMM YYYY")
datetime : created(format:"ddd MMM DD YYYY hh:mm:ss zZ")
status
excerpt
image(width:800)
path
timeToRead
}
}
}
}
</page-query>
<script>
import PostListItem from '~/components/PostListItem.vue';
import Pagination from "~/components/Pagination.vue";
export default {
metaInfo: {
title: "Projects"
},
components: {
PostListItem,
Pagination
},
computed: {
baseurl: function() {
return "/projects/"
}
},
};
</script>