adding support for projects

This commit is contained in:
hamdy
2020-11-09 23:44:15 +02:00
parent 76f35389c2
commit 790c32dce7
5 changed files with 336 additions and 0 deletions

55
src/pages/Projects.vue Normal file
View File

@@ -0,0 +1,55 @@
<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">
<ProjectListItem v-for="edge in $page.entries.edges" :key="edge.node.id" :record="edge.node" />
</div>
</div>
</Layout>
</template>
<page-query>
query($page:Int) {
entries: allProject(perPage: 9, page: $page) @paginate {
totalCount
pageInfo {
totalPages
currentPage
}
edges {
node {
title
members
rank
excerpt
image(width:800)
path
timeToRead
author {
id
image(width:64, height:64, fit:inside)
path
}
}
}
}
}
</page-query>
<script>
import ProjectListItem from '~/components/ProjectListItem.vue';
export default {
metaInfo: {
title: "Hello, world!"
},
components: {
ProjectListItem
}
};
</script>