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

refactor: Update adventure and collection page headers and date formatting

This commit is contained in:
Sean Morley 2024-07-27 14:40:33 -04:00
parent 59a3a2d72a
commit dbe2f01b8d

View file

@ -220,7 +220,7 @@
</div>
</div>
{/if}
<h1 class="text-center font-semibold text-2xl mt-4 mb-2">Linked Adventures</h1>
<h1 class="text-center font-bold text-4xl mt-4 mb-2">Linked Adventures</h1>
{#if adventures.length == 0}
<NotFound error={undefined} />
{/if}
@ -237,15 +237,17 @@
{/each}
</div>
{#if numberOfDays}
<p class="text-center text-lg mt-4 pl-16 pr-16">Duration: {numberOfDays} days</p>
{/if}
{#if collection.start_date && collection.end_date}
<h1 class="text-center font-bold text-4xl mt-4 mb-2">Itinerary</h1>
{#if numberOfDays}
<p class="text-center text-lg mt-4 pl-16 pr-16">Duration: {numberOfDays} days</p>
{/if}
<p class="text-center text-lg mt-4 pl-16 pr-16">
Dates: {new Date(collection.start_date).toLocaleDateString('en-US', { timeZone: 'UTC' })} - {new Date(
collection.end_date
).toLocaleDateString('en-US', { timeZone: 'UTC' })}
</p>
<div class="divider"></div>
{#each Array(numberOfDays) as _, i}
{@const currentDate = new Date(collection.start_date)}