Skip to content

Commit

Permalink
Merge pull request #176 from seanmorley15/development
Browse files Browse the repository at this point in the history
Update CollectionCard component and home page content
  • Loading branch information
seanmorley15 authored Aug 7, 2024
2 parents 14e4a5c + 844dd0c commit 0377153
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 16 deletions.
4 changes: 2 additions & 2 deletions frontend/src/lib/components/CollectionCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
});
if (res.ok) {
console.log(`Collection ${is_archived ? 'archived' : 'unarchived'}`);
addToast('info', `Adventure ${is_archived ? 'archived' : 'unarchived'} successfully!`);
addToast('info', `Collection ${is_archived ? 'archived' : 'unarchived'} successfully!`);
dispatch('delete', collection.id);
} else {
console.log('Error archiving adventure');
console.log('Error archiving collection');
}
}
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/lib/components/Navbar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@
class="dropdown-content bg-neutral text-neutral-content z-[1] menu p-2 shadow rounded-box w-52"
>
<button class="btn" on:click={() => (isAboutModalOpen = true)}>About AdventureLog</button>
<button
class="btn btn-sm mt-2"
on:click={() => (window.location.href = 'https://docs.adventurelog.app/')}
>Documentation</button
>
<p class="font-bold m-4 text-lg">Theme Selection</p>
<form method="POST" use:enhance={submitUpdateTheme}>
<li>
Expand Down
33 changes: 20 additions & 13 deletions frontend/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,19 @@
</h1>
{/if}
<p class="max-w-[600px] text-gray-500 md:text-xl dark:text-gray-400">
Discover and plan your next epic adventure with our cutting-edge travel app. Explore
breathtaking destinations, create custom itineraries, and stay connected on the go.
Discover and plan your next adventure with AdventureLog. Explore breathtaking
destinations, create custom itineraries, and stay connected on the go.
</p>
</div>
<div class="flex flex-col gap-2 min-[400px]:flex-row">
<button on:click={() => goto('/adventures')} class="btn btn-primary">
Go To AdventureLog
</button>
{#if data.user}
<button on:click={() => goto('/adventures')} class="btn btn-primary">
Go To AdventureLog
</button>
{:else}
<button on:click={() => goto('/login')} class="btn btn-primary"> Log In </button>
<button on:click={() => goto('/signup')} class="btn btn-neutral"> Sign Up </button>
{/if}
</div>
</div>
<img
Expand Down Expand Up @@ -74,8 +79,8 @@
<p
class="max-w-[900px] text-gray-500 md:text-xl/relaxed lg:text-base/relaxed xl:text-xl/relaxed dark:text-gray-400"
>
Our adventure travel app is designed to simplify your journey, providing you with the
tools and resources to plan, pack, and navigate your next epic adventure.
AdventureLog is designed to simplify your journey, providing you with the tools and
resources to plan, pack, and navigate your next unforgettable adventure.
</p>
</div>
</div>
Expand All @@ -92,25 +97,27 @@
<ul class="grid gap-6">
<li>
<div class="grid gap-1">
<h3 class="text-xl font-bold dark:text-gray-400">Trip Planning</h3>
<h3 class="text-xl font-bold dark:text-gray-400">Travel Log</h3>
<p class="text-gray-500 dark:text-gray-400">
Easily create custom itineraries and get real-time updates on your trip.
Keep track of your adventures with a personalized travel log and share your
experiences with friends and family.
</p>
</div>
</li>
<li>
<div class="grid gap-1">
<h3 class="text-xl font-bold dark:text-gray-400">Packing Lists</h3>
<h3 class="text-xl font-bold dark:text-gray-400">Trip Planning</h3>
<p class="text-gray-500 dark:text-gray-400">
Never forget a thing with our comprehensive packing lists.
Easily create custom itineraries and get a day-by-day breakdown of your trip.
</p>
</div>
</li>
<li>
<div class="grid gap-1">
<h3 class="text-xl font-bold dark:text-gray-400">Destination Guides</h3>
<h3 class="text-xl font-bold dark:text-gray-400">Travel Map</h3>
<p class="text-gray-500 dark:text-gray-400">
Discover the best attractions, activities, and hidden gems in your destination.
View your travels throughout the world with an interactive map and explore new
destinations.
</p>
</div>
</li>
Expand Down
22 changes: 21 additions & 1 deletion frontend/src/routes/collections/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@
</div>
{/if}
{#if collection}
{#if data.user}
{#if data.user && !collection.is_archived}
<div class="fixed bottom-4 right-4 z-[999]">
<div class="flex flex-row items-center justify-center gap-4">
<div class="dropdown dropdown-top dropdown-end">
Expand Down Expand Up @@ -384,6 +384,26 @@
</div>
</div>
{/if}
{#if collection.is_archived}
<div class="flex items-center justify-center mt-4 mb-4">
<div role="alert" class="alert alert-warning w-96 inline-flex items-center justify-center">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6 shrink-0 stroke-current"
fill="none"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
/>
</svg>
<span>This collection has been archived.</span>
</div>
</div>
{/if}
{#if collection.name}
<h1 class="text-center font-extrabold text-4xl mb-2">{collection.name}</h1>
{/if}
Expand Down

0 comments on commit 0377153

Please sign in to comment.