1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-28 09:19: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>
</div> </div>
{/if} {/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} {#if adventures.length == 0}
<NotFound error={undefined} /> <NotFound error={undefined} />
{/if} {/if}
@ -237,15 +237,17 @@
{/each} {/each}
</div> </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} {#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"> <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( Dates: {new Date(collection.start_date).toLocaleDateString('en-US', { timeZone: 'UTC' })} - {new Date(
collection.end_date collection.end_date
).toLocaleDateString('en-US', { timeZone: 'UTC' })} ).toLocaleDateString('en-US', { timeZone: 'UTC' })}
</p> </p>
<div class="divider"></div>
{#each Array(numberOfDays) as _, i} {#each Array(numberOfDays) as _, i}
{@const currentDate = new Date(collection.start_date)} {@const currentDate = new Date(collection.start_date)}