Created
August 29, 2019 08:03
-
-
Save smokeyfro/d25f3716b11994e9d9899540595b5543 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<Layout> | |
<main class="p-10 relative z-10 bg-white mx-10 shadow-2xl"> | |
<article> | |
<h1>{{ $page.place.title }}</h1> | |
<ol class="list w-2/3 mx-auto list-view"> | |
<li v-for="item in $page.place.belongsTo.edges" :key="item.id"> | |
{{ item.title }} | |
</li> | |
</ol> | |
</article> | |
</main> | |
</Layout> | |
</template> | |
<page-query> | |
query Place($path: String, $page: Int) { | |
place: cockpitPlace(path: $path) { | |
title | |
excerpt | |
belongsTo(page: $page, perPage: 10) @paginate { | |
pageInfo { | |
totalPages | |
currentPage | |
} | |
edges { | |
node { | |
... on CockpitHost { | |
id | |
title | |
path | |
} | |
} | |
} | |
} | |
} | |
} | |
</page-query> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment