summaryrefslogtreecommitdiff
path: root/src/components/templates/PrevNextNav.astro
diff options
context:
space:
mode:
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>
)
}