Skip to content

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

Countdown only on upcoming day

Francesco Sansalvadore34337c41650b
diff --git a/apps/www/components/LaunchWeek/8/LW8CalloutsSection.tsx b/apps/www/components/LaunchWeek/8/LW8CalloutsSection.tsx
index 483ee7fd85b..45d26f2465e 100644
--- a/apps/www/components/LaunchWeek/8/LW8CalloutsSection.tsx
+++ b/apps/www/components/LaunchWeek/8/LW8CalloutsSection.tsx
@@ -8,7 +8,7 @@ const LW8CalloutsSection = () => {
return (
<SectionContainer className="!py-0 w-full !px-0 !max-w-none">
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4 scroll-mt-[105px]" id="hackathon">
- <SmallCard className="hover:from-background-surface-300 hover:to-background-surface-300">
+ <SmallCard className="hover:from-scale-900 hover:to-scale-900">
<Link href="https://twitter.com/i/spaces/1DXGyvjkeEeJM">
<a target="_blank" className="flex flex-row justify-between items-center w-full h-full">
<div className="relative flex-shrink flex items-center p-2 w-2/3 lg:w-1/2 md:w-auto">
@@ -28,7 +28,7 @@ const LW8CalloutsSection = () => {
</a>
</Link>
</SmallCard>
- <SmallCard className="hover:from-background-surface-300 hover:to-background-surface-300">
+ <SmallCard className="hover:from-scale-900 hover:to-scale-900">
<Link href="/blog/supabase-lw8-hackathon">
<a target="_blank" className="flex flex-row justify-between items-center w-full h-full">
<div className="relative h-full flex-shrink flex flex-col md:flex-row md:items-center p-2 w-2/3 lg:w-1/2 md:w-auto gap-1 md:gap-4">
diff --git a/apps/www/components/LaunchWeek/8/Releases/components/index.tsx b/apps/www/components/LaunchWeek/8/Releases/components/index.tsx
index fa042382218..48aebe9a0a9 100644
--- a/apps/www/components/LaunchWeek/8/Releases/components/index.tsx
+++ b/apps/www/components/LaunchWeek/8/Releases/components/index.tsx
@@ -123,69 +123,70 @@ export const StyledArticleBadge = ({
export const AccordionHeader = ({
date,
day,
+ weekDay,
title,
shipped,
publishedAt,
shippable = true,
}: {
date: string
- day: string
+ day: number
+ weekDay: string
title: string
shipped?: boolean
publishedAt: string
shippable?: boolean
-}) => {
- return (
- <div className="flex flex-1 flex-col sm:flex-row">
- <div className="flex gap-4 w-full sm:w-auto sm:min-w-[240px] md:min-w-[380px] items-center">
- <span className="text-scale-900 text-sm">
- <span className="inline sm:hidden md:inline">{day} </span>
- {date && (
- <span>
- <span className="inline sm:hidden md:inline">・</span> {date}
- </span>
- )}
+}) => (
+ <div className="flex flex-1 flex-col sm:flex-row">
+ <div className="flex gap-4 w-full sm:w-auto sm:min-w-[240px] md:min-w-[380px] items-center">
+ <span className="text-scale-900 text-sm">
+ <span className="inline sm:hidden md:inline">{weekDay} </span>
+ {date && (
+ <span>
+ <span className="inline sm:hidden md:inline">・</span> {date}
+ </span>
+ )}
+ </span>
+ </div>
+ {shippable && shipped && (
+ <Badge
+ className={`relative inset-0 !bg-transparent !py-1 !px-4 h-fit backdrop-blur-md ${
+ shipped
+ ? 'bg-gradient-to-br from-[#05090B] to-[#05090B] !border-[#061517]'
+ : 'border-[#FFFFFF20]'
+ }`}
+ >
+ <span className="text-[#A0A0A0] text-sm font-normal bg-clip-text bg-gradient-to-r from-[#F4FFFA] to-[#675FA7]">
+ Shipped
</span>
- </div>
- {shippable && shipped && (
- <Badge
- className={`relative inset-0 !bg-transparent !py-1 !px-4 h-fit backdrop-blur-md ${
- shipped
- ? 'bg-gradient-to-br from-[#05090B] to-[#05090B] !border-[#061517]'
- : 'border-[#FFFFFF20]'
- }`}
+ </Badge>
+ )}
+ {shipped && <span className="text-scale-1200 text-lg mt-1 sm:mt-0">{title}</span>}
+ {shippable && !shipped && (
+ <span className="text-sm font-normal text-[#A0A0A0] mt-1 sm:mt-0 flex items-center gap-1 md:gap-4">
+ <svg
+ width="17"
+ height="17"
+ viewBox="0 0 17 17"
+ fill="none"
+ xmlns="http://www.w3.org/2000/svg"
>
- <span className="text-[#A0A0A0] text-sm font-normal bg-clip-text bg-gradient-to-r from-[#F4FFFA] to-[#675FA7]">
- Shipped
- </span>
- </Badge>
- )}
- {shipped && <span className="text-scale-1200 text-lg mt-1 sm:mt-0">{title}</span>}
- {shippable && !shipped && (
- <span className="text-sm font-normal text-[#A0A0A0] mt-1 sm:mt-0 flex items-center gap-1 md:gap-4">
- <svg
- width="17"
- height="17"
- viewBox="0 0 17 17"
- fill="none"
- xmlns="http://www.w3.org/2000/svg"
- >
- <g opacity="0.5">
- <path
- fillRule="evenodd"
- clipRule="evenodd"
- d="M4.32656 7.58047V5.98047C4.32656 3.77133 6.11742 1.98047 8.32656 1.98047C10.5357 1.98047 12.3266 3.77133 12.3266 5.98047V7.58047C13.2102 7.58047 13.9266 8.29681 13.9266 9.18047V13.1805C13.9266 14.0641 13.2102 14.7805 12.3266 14.7805H4.32656C3.44291 14.7805 2.72656 14.0641 2.72656 13.1805V9.18047C2.72656 8.29681 3.44291 7.58047 4.32656 7.58047ZM10.7266 5.98047V7.58047H5.92656V5.98047C5.92656 4.65499 7.00108 3.58047 8.32656 3.58047C9.65205 3.58047 10.7266 4.65499 10.7266 5.98047Z"
- fill="#A0A0A0"
- />
- </g>
- </svg>
+ <g opacity="0.5">
+ <path
+ fillRule="evenodd"
+ clipRule="evenodd"
+ d="M4.32656 7.58047V5.98047C4.32656 3.77133 6.11742 1.98047 8.32656 1.98047C10.5357 1.98047 12.3266 3.77133 12.3266 5.98047V7.58047C13.2102 7.58047 13.9266 8.29681 13.9266 9.18047V13.1805C13.9266 14.0641 13.2102 14.7805 12.3266 14.7805H4.32656C3.44291 14.7805 2.72656 14.0641 2.72656 13.1805V9.18047C2.72656 8.29681 3.44291 7.58047 4.32656 7.58047ZM10.7266 5.98047V7.58047H5.92656V5.98047C5.92656 4.65499 7.00108 3.58047 8.32656 3.58047C9.65205 3.58047 10.7266 4.65499 10.7266 5.98047Z"
+ fill="#A0A0A0"
+ />
+ </g>
+ </svg>
+
+ {day === 1 && <CountdownComponent date={publishedAt} showCard={false} />}
+ </span>
+ )}
+ </div>
+)
- <CountdownComponent date={publishedAt} showCard={false} />
- </span>
- )}
- </div>
- )
-}
export const MultistepSectionHeader = ({ title, blog }: any) => {
return (
<div className="flex flex-1 flex-col sm:flex-row py-8">
diff --git a/apps/www/components/LaunchWeek/8/Releases/index.tsx b/apps/www/components/LaunchWeek/8/Releases/index.tsx
index 2588c7ebfe2..6681fd2a1c9 100644
--- a/apps/www/components/LaunchWeek/8/Releases/index.tsx
+++ b/apps/www/components/LaunchWeek/8/Releases/index.tsx
@@ -1,20 +1,11 @@
import Image from 'next/image'
import { motion } from 'framer-motion'
-import { Accordion, Badge } from 'ui'
+import { Accordion } from 'ui'
import { useBreakpoint } from 'common/hooks/useBreakpoint'
-import days, { WeekDayProps, endOfLW8 } from './lw8_data'
+import days, { WeekDayProps } from './lw8_data'
import SectionContainer from '~/components/Layouts/SectionContainer'
-import {
- AccordionHeader,
- CartTitle,
- ChipLink,
- PencilSvg,
- SectionButtons,
- SmallCard,
- StyledArticleBadge,
-} from './components'
-import Link from 'next/link'
+import { AccordionHeader, CartTitle, SectionButtons, StyledArticleBadge } from './components'
export const defaultEase = [0.25, 0.25, 0, 1]
export const defaultDuratonIn = 0.25
@@ -167,16 +158,16 @@ export default function LW8Releases() {
size="large"
className="text-white"
justified={false}
- // bordered={false}
chevronAlign="right"
defaultValue={publishedSections}
>
- <div className="border-b border-[#111718]">
+ <div className="border-b border-[#111718]" id="currentDay">
<Accordion.Item
header={
<AccordionHeader
date={preRelease.date}
- day={preRelease.dd}
+ day={preRelease.d}
+ weekDay={preRelease.dd}
title={preRelease.title}
shipped={true}
shippable={false}
@@ -184,7 +175,6 @@ export default function LW8Releases() {
/>
}
key={preRelease.dd}
- // disabled={!prereleaseShipped}
className="h-[79px]"
id={preRelease.d.toString()}
>
@@ -232,51 +222,6 @@ export default function LW8Releases() {
)
)}
</motion.div>
- {/* <motion.div
- className={`
- relative overflow-hidden group/3 flex-1 flex flex-col items-center justify-between
- basis-1/2 lg:basis-1/3 border border-[#111718] rounded-xl h-full bg-no-repeat py-10 sm:py-14 px-8 lg:px-10 text-2xl bg-contain shadow-lg
- `}
- initial="default"
- animate="default"
- whileHover="hover"
- >
- <div
- className="top-0 absolute group-hover/3:scale-105 opacity-60 group-hover/3:opacity-100 w-full h-full -z-10 transition-all duration-500"
- style={{
- background: `radial-gradient(100% 100% at 80% 110%, #6F13A450, #030A0C)`,
- }}
- />
- <div className="flex flex-col items-center gap-2 min-w-[300px]">
- <CartTitle>{preRelease.steps[1].title}</CartTitle>
- <p className="text-sm text-slate-900">{preRelease.steps[1].description}</p>
- </div>
- <SectionButtons
- github={preRelease.steps[1].github}
- blog={preRelease.steps[1].blog}
- />
- {preRelease.steps[1].bg_layers &&
- preRelease.steps[1].bg_layers?.map(
- (layer, i) =>
- !!layer.img && (
- <motion.div
- className="absolute opacity-90 inset-0 w-full h-full -z-10"
- variants={i === 1 ? scaleOpacityVariant : undefined}
- >
- <Image
- src={layer.img}
- className={`
- absolute opacity-90
- w-full h-full -z-10 transition-all duration-300
- `}
- layout="fill"
- objectPosition="50% 50%"
- objectFit="cover"
- />
- </motion.div>
- )
- )}
- </motion.div> */}
</div>
)}
</Accordion.Item>
@@ -286,7 +231,8 @@ export default function LW8Releases() {
header={
<AccordionHeader
date={day1.date}
- day={day1.dd}
+ day={day1.d}
+ weekDay={day1.dd}
title={day1.title}
shipped={day1Shipped}
publishedAt={day1.publishedAt}
@@ -360,7 +306,8 @@ export default function LW8Releases() {
header={
<AccordionHeader
date={day2.date}
- day={day2.dd}
+ day={day2.d}
+ weekDay={day2.dd}
title={day2.title}
shipped={day2Shipped}
publishedAt={day2.publishedAt}
@@ -434,7 +381,8 @@ export default function LW8Releases() {
header={
<AccordionHeader
date={day3.date}
- day={day3.dd}
+ day={day3.d}
+ weekDay={day3.dd}
title={day3.title}
shipped={day3Shipped}
publishedAt={day3.publishedAt}
@@ -508,7 +456,8 @@ export default function LW8Releases() {
header={
<AccordionHeader
date={day4.date}
- day={day4.dd}
+ day={day4.d}
+ weekDay={day4.dd}
title={day4.title}
shipped={day4Shipped}
publishedAt={day4.publishedAt}
@@ -575,12 +524,13 @@ export default function LW8Releases() {
)}
</Accordion.Item>
</div>
- <div className="border-b border-[#111718]" id="currentDay">
+ <div className="border-b border-[#111718]">
<Accordion.Item
header={
<AccordionHeader
date={day5.date}
- day={day5.dd}
+ day={day5.d}
+ weekDay={day5.dd}
title={day5.title}
shipped={day5Shipped}
publishedAt={day5.publishedAt}
@@ -589,7 +539,63 @@ export default function LW8Releases() {
disabled={!day5Shipped}
className="h-[79px]"
id={day5.d.toString()}
- ></Accordion.Item>
+ >
+ {day5.steps.length > 0 && (
+ <div className="h-[400px] flex flex-col gap-5 lg:flex-row pb-8">
+ <motion.div
+ className={`
+ relative overflow-hidden group/2 flex-1 flex flex-col items-center gap-5 lg:items-start justify-between
+ w-full border rounded-xl h-full px-4 sm:px-8 lg:px-14 py-14 xs:text-2xl text-xl text-center shadow-lg
+ `}
+ initial="default"
+ animate="default"
+ whileHover="hover"
+ >
+ <div className="flex items-center text-center lg:text-left justify-between flex-col-reverse lg:flex-row lg:justify-start gap-2 text-black dark:text-white">
+ <CartTitle>{day5.steps[0]?.title}</CartTitle>
+ <StyledArticleBadge className="lg:ml-2">New</StyledArticleBadge>
+ </div>
+ <SectionButtons
+ docs={day5.steps[0]?.docs}
+ blog={day5.steps[0]?.blog}
+ video={day5.steps[0]?.video}
+ hackernews={day5.steps[0]?.hackernews}
+ mobileGrid
+ />
+ {day5.steps[0]?.bg_layers &&
+ day5.steps[0]?.bg_layers?.map(
+ (layer, i) =>
+ !!layer.img && (
+ <motion.div
+ className={['absolute inset-0 w-full h-full -z-10'].join(' ')}
+ variants={getDay4Motion(i)}
+ >
+ <Image
+ src={
+ !!layer.mobileImg && isTablet
+ ? (layer.mobileImg as any)
+ : layer.img
+ }
+ className={[
+ `
+ absolute
+ w-full h-full -z-10 transition-all duration-300
+ `,
+ ].join(' ')}
+ layout="fill"
+ objectPosition={
+ !!layer.mobileImg && isTablet ? '50% 65%' : '80% 50%'
+ }
+ objectFit="cover"
+ quality={100}
+ />
+ </motion.div>
+ )
+ )}
+ </motion.div>
+ </div>
+ )}
+ </Accordion.Item>
</div>
</Accordion>
</SectionContainer>
diff --git a/apps/www/components/LaunchWeek/8/Releases/lw8_data.ts b/apps/www/components/LaunchWeek/8/Releases/lw8_data.ts
index cc790dcd7d3..06a995f0283 100644
--- a/apps/www/components/LaunchWeek/8/Releases/lw8_data.ts
+++ b/apps/www/components/LaunchWeek/8/Releases/lw8_data.ts
@@ -38,14 +38,14 @@ export interface WeekDayProps {
steps: StepProps[] | []
}
-export const endOfLW8 = '2023-08-11T23:59:59.999-08:00'
+export const endOfLW8 = '2023-08-11T23:59:59.999-07:00'
const days: WeekDayProps[] = [
{
title: '',
shipped: true,
date: '04 Aug',
- publishedAt: '2023-08-04T07:00:00.000-08:00',
+ publishedAt: '2023-08-04T09:00:00.000-07:00',
description: '',
d: 0,
dd: 'Pre-release',
@@ -72,7 +72,7 @@ const days: WeekDayProps[] = [
title: '',
shipped: true,
date: '07 Aug',
- publishedAt: '2023-08-07T07:00:00.000-08:00',
+ publishedAt: '2023-08-07T09:00:00.000-07:00',
description: '',
d: 1,
dd: 'Mon',
@@ -85,7 +85,7 @@ const days: WeekDayProps[] = [
title: '',
shipped: true,
date: '08 Aug',
- publishedAt: '2023-08-08T07:00:00.000-08:00',
+ publishedAt: '2023-08-08T09:00:00.000-07:00',
description: '',
d: 2,
dd: 'Tue',
@@ -98,7 +98,7 @@ const days: WeekDayProps[] = [
title: '',
shipped: true,
date: '09 Aug',
- publishedAt: '2023-08-09T07:00:00.000-08:00',
+ publishedAt: '2023-08-09T09:00:00.000-07:00',
description: '',
d: 3,
dd: 'Wed',
@@ -111,7 +111,7 @@ const days: WeekDayProps[] = [
title: '',
shipped: true,
date: '10 Aug',
- publishedAt: '2023-08-10T07:00:00.000-08:00',
+ publishedAt: '2023-08-10T09:00:00.000-07:00',
description: '',
d: 4,
dd: 'Thu',
@@ -124,7 +124,7 @@ const days: WeekDayProps[] = [
title: '',
shipped: true,
date: '11 Aug',
- publishedAt: '2023-08-11T00:00:00.000-08:00',
+ publishedAt: '2023-08-11T00:00:00.000-07:00',
description: '',
d: 5,
dd: 'Fri',
diff --git a/apps/www/lib/constants.ts b/apps/www/lib/constants.ts
index 2582abf0ff7..45408582f02 100644
--- a/apps/www/lib/constants.ts
+++ b/apps/www/lib/constants.ts
@@ -38,7 +38,7 @@ export const TWITTER_USER_NAME = 'supabase'
export const COOKIE = 'supa-lw8-ticket-user-id'
export const LW7_DATE = 'April 10th 2023'
export const LW8_DATE = 'August 7-11'
-export const LW8_LAUNCH_DATE = '2023-08-07T09:00:00.000-08:00'
+export const LW8_LAUNCH_DATE = '2023-08-07T09:00:00.000-07:00'
export const TWEET_TEXT =
'#SupaLaunchWeek 8 is coming August 7-11! Join the party and generate your custom ticket for a chance to win swag ✨'
export const TWEET_TEXT_GOLDEN = `I turned my #SupaLaunchWeek 8 ticket GOLD! 🌟😎🌟\n\n`