1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-21 05:49:37 +02:00

Refactor AdventureCard component and add CardCarousel

- Refactor AdventureCard component to remove unused variable and add meta tags for shared collections page
- Add CardCarousel component to display a carousel of adventure images in AdventureCard
This commit is contained in:
Sean Morley 2024-10-13 23:23:32 -04:00
parent 5b7aaa6aad
commit 3ee9625fe8
6 changed files with 94 additions and 57 deletions

View file

@ -9,7 +9,7 @@
import ArchiveArrowUp from '~icons/mdi/archive-arrow-up';
import { goto } from '$app/navigation';
import type { Collection } from '$lib/types';
import type { Adventure, Collection } from '$lib/types';
import { addToast } from '$lib/toasts';
import Plus from '~icons/mdi/plus';
@ -17,14 +17,15 @@
import TrashCan from '~icons/mdi/trashcan';
import DeleteWarning from './DeleteWarning.svelte';
import ShareModal from './ShareModal.svelte';
import ImageDisplayModal from './ImageDisplayModal.svelte';
import CardCarousel from './CardCarousel.svelte';
const dispatch = createEventDispatcher();
export let type: String | undefined | null;
export let adventures: Adventure[] = [];
let isShareModalOpen: boolean = false;
// export let type: String;
function editAdventure() {
dispatch('edit', collection);
}
@ -86,6 +87,7 @@
<div
class="card min-w-max lg:w-96 md:w-80 sm:w-60 xs:w-40 bg-neutral text-neutral-content shadow-xl"
>
<CardCarousel {adventures} />
<div class="card-body">
<div class="flex justify-between">
<button