blob: 6ae6bef83ce7d91d151f3fee9a29f4967d98b919 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
---
const { prevPost, nextPost } = Astro.props;
---
<style lang="scss">
.pagination {
overflow: hidden;
padding: 5rem 0;
width: 100%;
}
@media (width <=684px) {
.pagination {
padding: 2rem 0;
}
}
.prev,
.next {
max-width: 40%;
}
.prev {
float: left;
}
.next {
float: right;
}
</style>
<div class="pagination">
{
prevPost && (
<span class="prev">
<a href={`/blog/${prevPost.slug}`}>< {prevPost.data.title}</a>
</span>
)
}
{
nextPost && (
<span class="next">
<a href={`/blog/${nextPost.slug}`}>{nextPost.data.title} ></a>
</span>
)
}
</div>
|