From 0fc3acd238f1ae826357e6ea0ea5237487fa908b Mon Sep 17 00:00:00 2001 From: Antoine Phan Date: Fri, 29 Aug 2025 19:43:07 -0400 Subject: [PATCH] Fix thumbnail stretching weirdly on Event page --- src/components/EventBlock.svelte | 187 +++++++++++++++--------------- src/routes/events/+page.server.ts | 2 +- 2 files changed, 93 insertions(+), 96 deletions(-) diff --git a/src/components/EventBlock.svelte b/src/components/EventBlock.svelte index 9ba12ef..e7ba619 100644 --- a/src/components/EventBlock.svelte +++ b/src/components/EventBlock.svelte @@ -1,106 +1,103 @@ -
-
-
- {#if thumbnail} - Event banner - {:else if eventCategory?.[0] === 'social'} - Social Placeholder - {:else if eventCategory?.[0] === 'technical'} - Technical Placeholder - {:else if eventCategory?.[0] === 'professional'} - Professional Placeholder - {:else if eventCategory?.[0] === 'academic'} - Academic Placeholder - {:else} - Default Placeholder - {/if} -
-
+
+
+
+ {#if thumbnail} + Event banner + {:else if eventCategory?.[0] === 'social'} + Social Placeholder + {:else if eventCategory?.[0] === 'technical'} + Technical Placeholder + {:else if eventCategory?.[0] === 'professional'} + Professional Placeholder + {:else if eventCategory?.[0] === 'academic'} + Academic Placeholder + {:else} + Default Placeholder + {/if} +
+
- -
-

- {eventTitle} -

+ +
+

+ {eventTitle} +

- {#if eventDescription} -
- -
- {/if} + {#if eventDescription} +
+ +
+ {/if} -
+
+
+
+ + Datetime: +

{date}

+
-
-
- - Datetime: -

{date}

-
+
+ + Location: +

{location ?? 'TBA'}

+
+
-
- - Location: -

{location ?? 'TBA'}

-
-
+
+
+ + Registration: + {#if registrationLink} + + Register Here + + {:else} +

Just drop in!

+ {/if} +
-
-
- - Registration: - {#if registrationLink} - - Register Here - - {:else} -

Just drop in!

- {/if} -
- -
- - Payment: - {#if paymentLink} - - Pay Here - - {:else} -

Free!

- {/if} -
-
-
-
+
+ + Payment: + {#if paymentLink} + + Pay Here + + {:else} +

Free!

+ {/if} +
+
+
+
diff --git a/src/routes/events/+page.server.ts b/src/routes/events/+page.server.ts index a294d3a..d9d7879 100644 --- a/src/routes/events/+page.server.ts +++ b/src/routes/events/+page.server.ts @@ -9,7 +9,7 @@ const eventQuery = `*[_type == "events"]{ description, reglink, paylink, - "thumbnail": thumbnail.asset->url, + "thumbnail": thumbnail.asset->url+"?h=700&fm=webp", "lastUpdated": _updatedAt, }`;