1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-23 06: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

@ -6,7 +6,6 @@
import type { Adventure } from '$lib/types';
export let image: string;
export let adventure: Adventure;
onMount(() => {
modal = document.getElementById('my_modal_1') as HTMLDialogElement;
@ -43,7 +42,7 @@
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<div class="modal-box w-11/12 max-w-5xl" role="dialog" on:keydown={handleKeydown} tabindex="0">
<div class="modal-header flex justify-between items-center mb-4">
<h3 class="font-bold text-2xl">{adventure.name}</h3>
<h3 class="font-bold text-2xl">Image Preview</h3>
<button class="btn btn-circle btn-neutral" on:click={close}>
<svg
xmlns="http://www.w3.org/2000/svg"
@ -67,7 +66,7 @@
>
<img
src={image}
alt={adventure.name}
alt="My Adventure"
style="max-width: 100%; max-height: 75vh; object-fit: contain;"
/>
</div>