Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: nits on events page (#40620)

Alan Daniel93aaae099271
diff --git a/apps/www/components/Events/new/EventBanner.tsx b/apps/www/components/Events/new/EventBanner.tsx
index 439e72306e7..66aae718c2f 100644
--- a/apps/www/components/Events/new/EventBanner.tsx
+++ b/apps/www/components/Events/new/EventBanner.tsx
@@ -1,6 +1,6 @@
'use client'
-import { CalendarIcon, MapPinIcon, UsersIcon } from 'lucide-react'
+import { CalendarIcon, MapPinIcon } from 'lucide-react'
import Image from 'next/image'
import Link from 'next/link'
import { cn, Button } from 'ui'
@@ -8,7 +8,7 @@ import { useEvents } from '~/app/events/context'
import { formatHosts } from '~/lib/eventsUtils'
export function EventBanner() {
- const { isLoading, allEvents, featuredEvent } = useEvents()
+ const { isLoading, featuredEvent } = useEvents()
if (isLoading) {
return <EventBannerSkeleton />
@@ -17,13 +17,13 @@ export function EventBanner() {
if (!featuredEvent) return null
return (
- <section className={cn('grid md:grid-cols-[minmax(320px,35%),1fr] gap-12')}>
+ <section className={cn('grid md:grid-cols-[minmax(320px,35%),1fr] gap-6 lg:gap-12')}>
<CoverImage url={featuredEvent.cover_url} />
- <article className="flex flex-col gap-6 py-2">
- <div className="flex justify-between items-start">
+ <article className="flex flex-col md:justify-center gap-6 lg:py-2">
+ <div className="flex justify-between items-start gap-4">
<div className="flex flex-col gap-1.5">
- <h2 className="text-2xl font-medium">{featuredEvent.title}</h2>
+ <h2 className="text-2xl font-medium lg:line-clamp-2">{featuredEvent.title}</h2>
<p
className="text-lg font-medium text-foreground-light"
title={`Hosted by ${formatHosts(featuredEvent.hosts).fullList}`}
@@ -50,9 +50,11 @@ export function EventBanner() {
<LocationWidget location={featuredEvent.location} />
</div>
- <p className="whitespace-pre-line text-foreground-light mt-4">
- {featuredEvent.description}
- </p>
+ <div className="relative flex">
+ <p className="text-foreground-light line-clamp-3 lg:line-clamp-4">
+ {featuredEvent.description}
+ </p>
+ </div>
{featuredEvent.link && (
<Button className="block md:hidden mt-1" size="medium" asChild>
@@ -75,7 +77,7 @@ const DateWidget = ({ date, endDate }: { date: string; endDate?: string }) => {
const formattedDate = eventDate.toLocaleDateString('en-US', {
weekday: 'long',
- month: 'long',
+ month: 'short',
day: 'numeric',
})
@@ -105,8 +107,8 @@ const DateWidget = ({ date, endDate }: { date: string; endDate?: string }) => {
return (
<div className="flex items-center gap-4">
- <div className="bg-surface-100 p-1.5 border rounded-md">
- <CalendarIcon className="size-7" />
+ <div className="bg-surface-100 w-10 h-10 flex items-center justify-center border rounded-md">
+ <CalendarIcon className="size-5" strokeWidth={1.5} />
</div>
<div className="flex flex-col gap-0">
@@ -123,8 +125,8 @@ const LocationWidget = ({ location }: { location?: string }) => {
return (
<div className="flex items-center gap-4">
- <div className="bg-surface-100 p-1.5 border rounded-md">
- <MapPinIcon className="size-7" />
+ <div className="bg-surface-100 w-10 h-10 flex items-center justify-center border rounded-md">
+ <MapPinIcon className="size-5" strokeWidth={1.5} />
</div>
<div className="flex flex-col gap-0">
@@ -138,14 +140,14 @@ const LocationWidget = ({ location }: { location?: string }) => {
const CoverImage = ({ url }: { url?: string }) => {
if (!url)
return (
- <div className="w-full bg-surface-100 aspect-square border rounded-lg grid place-items-center">
+ <div className="w-full bg-surface-100 aspect-square border rounded-lg hidden md:grid place-items-center">
<Logo />
</div>
)
return (
- <div className="w-full bg-surface-100 aspect-square border rounded-lg overflow-hidden relative">
- <img src={url} alt="Event Cover" className="object-cover w-full" />
+ <div className="w-full bg-surface-100 hidden md:block aspect-square border rounded-lg overflow-hidden relative">
+ <img src={url} alt="Event Cover" className="object-cover object-center w-full" />
</div>
)
}
diff --git a/apps/www/components/Events/new/EventClientRenderer.tsx b/apps/www/components/Events/new/EventClientRenderer.tsx
index 96399b77328..21568b7fdd4 100644
--- a/apps/www/components/Events/new/EventClientRenderer.tsx
+++ b/apps/www/components/Events/new/EventClientRenderer.tsx
@@ -11,18 +11,18 @@ export function EventClientRenderer({ staticEvents }: { staticEvents: SupabaseEv
return (
<EventsProvider staticEvents={staticEvents}>
<DefaultLayout className="flex flex-col">
- <SectionContainer className="border-x border-b lg:!py-12">
- <h1 className="h1">
+ <SectionContainer className="border-x border-b !py-8">
+ <h1 className="h3 !p-0 !m-0">
<span className="sr-only">Supabase</span> Events
</h1>
<p className="text-foreground-light">Join us at the following upcoming events</p>
</SectionContainer>
- <SectionContainer className="border-x flex-1 lg:!pt-12">
+ <SectionContainer className="border-x border-b flex-1 !py-8">
<EventBanner />
</SectionContainer>
- <SectionContainer className="border-x flex-1 !pt-0">
+ <SectionContainer className="border-x flex-1 !pt-8">
<EventGallery />
</SectionContainer>
</DefaultLayout>