improve relatedarticles layout
This commit is contained in:
parent
1089b32e26
commit
1ebdd2bd9c
3 changed files with 3 additions and 6 deletions
|
@ -33,4 +33,5 @@ export default defineConfig({
|
||||||
experimental: {
|
experimental: {
|
||||||
responsiveImages: true,
|
responsiveImages: true,
|
||||||
},
|
},
|
||||||
|
prefetch: true,
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,7 +9,7 @@ const { href, link } = Astro.props;
|
||||||
|
|
||||||
<a href={`${href}`}>
|
<a href={`${href}`}>
|
||||||
<div
|
<div
|
||||||
class="m-4 flex w-fit animate-reveal flex-row items-center gap-1 justify-self-center rounded-full bg-tertiary px-2 py-1 text-sm font-medium capitalize text-primary opacity-0 transition-colors [animation-delay:0.1s] hover:bg-accent"
|
class="m-4 flex w-fit animate-reveal flex-row items-center gap-1 justify-self-center rounded-full bg-tertiary px-2 py-1 text-sm font-medium capitalize text-primary opacity-0 transition-colors [animation-delay:0.1s] hover:bg-accent text-center text-nowrap"
|
||||||
>
|
>
|
||||||
{link}
|
{link}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -19,19 +19,15 @@ const next = items[(index + 1) % items.length];
|
||||||
|
|
||||||
{
|
{
|
||||||
items.length > 1 ? (
|
items.length > 1 ? (
|
||||||
<div class="mx-auto mt-8 flex max-w-prose justify-between gap-4 md:gap-0">
|
<div class="mx-auto mt-8 flex max-w-prose md:flex-row justify-between gap-4 md:gap-0 flex-col-reverse">
|
||||||
<div class="group flex w-fit flex-row items-center justify-between">
|
|
||||||
<Button
|
<Button
|
||||||
href={`/${prev.collection}/${prev.slug}`}
|
href={`/${prev.collection}/${prev.slug}`}
|
||||||
link={`Previous: ${prev.data.title}`}
|
link={`Previous: ${prev.data.title}`}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
<div class="group flex w-fit flex-row items-center justify-between self-end">
|
|
||||||
<Button
|
<Button
|
||||||
href={`/${next.collection}/${next.slug}`}
|
href={`/${next.collection}/${next.slug}`}
|
||||||
link={`Next: ${next.data.title}`}
|
link={`Next: ${next.data.title}`}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
) : null
|
) : null
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue