Skip to content

Instantly share code, notes, and snippets.

@smokeyfro
Created August 29, 2019 08:03
Show Gist options
  • Save smokeyfro/d25f3716b11994e9d9899540595b5543 to your computer and use it in GitHub Desktop.
Save smokeyfro/d25f3716b11994e9d9899540595b5543 to your computer and use it in GitHub Desktop.
<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