shack/pages/shelves/shelf.page.vue

44 lines
656 B
Vue
Raw Normal View History

2023-06-05 23:30:46 +00:00
<template>
<Shelf :shelf="shelf">
2023-06-05 23:30:46 +00:00
<ul class="posts nolist">
<li
v-for="post in posts"
:key="post.id"
class="post-item"
2023-06-25 17:52:00 +00:00
>
<Post
:post="post"
:shelf="shelf"
/>
</li>
2023-06-05 23:30:46 +00:00
</ul>
</Shelf>
2023-06-05 23:30:46 +00:00
</template>
<script setup>
import Shelf from '../../templates/shelves/shelf.vue';
2023-06-25 17:52:00 +00:00
import Post from '../../components/posts/post.vue';
2023-06-05 23:30:46 +00:00
2023-06-25 17:52:00 +00:00
import { usePageContext } from '../../renderer/usePageContext';
2023-06-05 23:30:46 +00:00
const { pageData } = usePageContext();
2023-06-05 23:30:46 +00:00
const {
shelf,
posts,
} = pageData;
</script>
<style scoped>
.posts {
width: 100%;
display: flex;
flex-direction: column;
2023-06-05 23:30:46 +00:00
margin-bottom: 1rem;
}
.post-item {
width: 100%;
}
2023-06-05 23:30:46 +00:00
</style>