summaryrefslogtreecommitdiff
path: root/src/components/templates/PrevNextNav.astro
diff options
context:
space:
mode:
authorJoão Augusto Costa Branco Marado Torres <torres.dev@disroot.org>2025-07-27 12:34:14 -0300
committerJoão Augusto Costa Branco Marado Torres <torres.dev@disroot.org>2025-07-27 12:34:14 -0300
commitbd27bbb073465be77e4e752e6bf9bc4cf5e84c60 (patch)
treeaeca59ee65177259a71f6068269451a3a4512001 /src/components/templates/PrevNextNav.astro
parent9f3b746f72bc7895d3f659a7201969349f5e5298 (diff)
feat: styling microblogs
Signed-off-by: João Augusto Costa Branco Marado Torres <torres.dev@disroot.org>
Diffstat (limited to 'src/components/templates/PrevNextNav.astro')
-rw-r--r--src/components/templates/PrevNextNav.astro13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/components/templates/PrevNextNav.astro b/src/components/templates/PrevNextNav.astro
index fe8bd8d..f60a4cd 100644
--- a/src/components/templates/PrevNextNav.astro
+++ b/src/components/templates/PrevNextNav.astro
@@ -1,21 +1,23 @@
---
interface Props {
+ first?: string | URL;
previous?: string | URL;
next?: string | URL;
+ last?: string | URL;
label?: string;
}
-const { next, previous, label } = Astro.props;
+const { first, next, previous, last, label } = Astro.props;
---
{
- (next || previous) && (
+ (first || next || previous || last) && (
<nav>
+ {first && <p><a href={Astro.props.first}>Primeiro</a></p>}
{
previous && (
<p>
- &lt; <a rel="prev" href={`/blog/${Astro.props.previous}`}
- >Anterior</a>
+ &lt; <a rel="prev" href={Astro.props.previous}>Anterior</a>
</p>
)
}
@@ -23,10 +25,11 @@ const { next, previous, label } = Astro.props;
{
next && (
<p>
- <a rel="next" href={`/blog/${Astro.props.next}`}>Próximo</a> &gt;
+ <a rel="next" href={Astro.props.next}>Próximo</a> &gt;
</p>
)
}
+ {last && <p><a href={Astro.props.last}>Último</a></p>}
</nav>
)
}