reworking carousel on dashboard

This commit is contained in:
maxDorninger
2025-06-24 21:07:43 +02:00
parent 02807af6e9
commit dbc20a2c47
5 changed files with 39 additions and 35 deletions

View File

@@ -33,7 +33,7 @@
}
</script>
<Card.Root class="col-span-full h-full overflow-x-hidden sm:col-span-1">
<Card.Root class="col-span-full flex h-full flex-col overflow-x-hidden sm:col-span-1">
<Card.Header>
<Card.Title class="flex h-12 items-center leading-tight">
{result.name}
@@ -45,10 +45,10 @@
>{result.overview !== '' ? result.overview : 'No overview available'}</Card.Description
>
</Card.Header>
<Card.Content class="flex h-96 w-full items-center justify-center">
<Card.Content class="flex flex-1 items-center justify-center">
{#if result.poster_path != null}
<img
class="max-h-full max-w-full rounded-lg object-contain"
class="h-full w-full rounded-lg object-contain"
src={result.poster_path}
alt="{result.name}'s Poster Image"
/>

View File

@@ -12,21 +12,22 @@
align: 'start',
loop: true
}}
class="max-w-[80vw]"
plugins={[
Autoplay({
delay: 4000,
delay: 5000,
stopOnInteraction: false,
stopOnMouseEnter: true,
playOnInit: true
playOnInit: true,
stopOnFocusIn: true
})
]}
>
<Carousel.Content class="-ml-1">
<Carousel.Content>
{#each shows as show}
<Carousel.Item class="pl-1 md:basis-1/2 lg:basis-1/3">
<div class="p-1">
<AddShowCard result={show}/>
</div>
<Carousel.Item class="md:basis-1/2 md:max-w-[40vw] xl:max-w-[20vw]">
<AddShowCard result={show}/>
</Carousel.Item>
{/each}
</Carousel.Content>