new adventure card

This commit is contained in:
Sean Morley
2024-07-16 14:50:30 -04:00
parent 58cb6baab0
commit e643362011
2 changed files with 61 additions and 46 deletions

View File

@@ -15,6 +15,7 @@
let collection: Collection;
let adventures: Adventure[] = [];
let numVisited: number = adventures.filter((a) => a.type == 'visited').length;
let notFound: boolean = false;
let isShowingCreateModal: boolean = false;
@@ -151,6 +152,21 @@
{#if collection.name}
<h1 class="text-center font-extrabold text-4xl mb-2">{collection.name}</h1>
{/if}
{#if adventures.length > 0}
<div class="flex items-center justify-center mb-4">
<div class="stats shadow bg-base-300">
<div class="stat">
<div class="stat-title">Region Stats</div>
<div class="stat-value">{numVisited}/{adventures.length} Visited</div>
{#if numVisited === adventures.length}
<div class="stat-desc">You've completed this collection! 🎉!</div>
{:else}
<div class="stat-desc">Keep exploring!</div>
{/if}
</div>
</div>
</div>
{/if}
<h1 class="text-center font-semibold text-2xl mt-4 mb-2">Linked Adventures</h1>
<div class="flex flex-wrap gap-4 mr-4 justify-center content-center">
{#each adventures as adventure}