Skip to content

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

add supabadges, fix logic for different styles

Francisco Mazzoni72c2b408dc80
diff --git a/apps/www/components/LaunchWeek/Ticket/ticket-form.tsx b/apps/www/components/LaunchWeek/Ticket/ticket-form.tsx
index 8a758c6c6f3..04417a13898 100644
--- a/apps/www/components/LaunchWeek/Ticket/ticket-form.tsx
+++ b/apps/www/components/LaunchWeek/Ticket/ticket-form.tsx
@@ -75,13 +75,7 @@ export default function Form({ defaultUsername = '', setTicketGenerationState }:
}}
>
<p className={`${username && 'text-scale-500'}`}>
- {formState === 'loading' ? (
- <LoadingDots size={4} />
- ) : username ? (
- 'Done!'
- ) : (
- 'Connect with GitHub'
- )}
+ {username ? 'Done!' : 'Connect with GitHub'}
</p>
{username ? (
<span className={ticketFormStyles.checkIcon}>
@@ -89,9 +83,11 @@ export default function Form({ defaultUsername = '', setTicketGenerationState }:
</span>
) : null}
</button>
- <p className={'text-xs text-scale-300 dark:text-scale-900 pl-1'}>
- Only public info will be used.
- </p>
+ {!username && (
+ <p className={'text-xs text-scale-300 dark:text-scale-900 pl-1'}>
+ Only public info will be used.
+ </p>
+ )}
</div>
</form>
)
diff --git a/apps/www/components/LaunchWeek/Ticket/ticket-info.module.css b/apps/www/components/LaunchWeek/Ticket/ticket-info.module.css
index 117922b8074..72d59e76955 100644
--- a/apps/www/components/LaunchWeek/Ticket/ticket-info.module.css
+++ b/apps/www/components/LaunchWeek/Ticket/ticket-info.module.css
@@ -1,6 +1,5 @@
.info {
display: flex;
- flex-direction: column;
gap: 0px;
margin-bottom: 64px;
padding: 32px;
@@ -34,7 +33,7 @@
.date {
/* text-transform: uppercase; */
- font-size: calc(18px * var(--size));
+ /* font-size: calc(18px * var(--size)); */
color: var(--lw-secondary-color);
}
@@ -47,7 +46,7 @@
.date {
margin-bottom: 0;
line-height: 1.15;
- font-size: calc(20px * var(--size));
+ /* font-size: calc(20px * var(--size)); */
}
}
diff --git a/apps/www/components/LaunchWeek/Ticket/ticket-info.tsx b/apps/www/components/LaunchWeek/Ticket/ticket-info.tsx
index 0bf9bb1f9c8..b7b76cbbd1a 100644
--- a/apps/www/components/LaunchWeek/Ticket/ticket-info.tsx
+++ b/apps/www/components/LaunchWeek/Ticket/ticket-info.tsx
@@ -11,10 +11,10 @@ export default function TicketInfo({
}) {
return (
<div className={styles.info}>
- <div className={cn(styles.date, { [styles['date-golden']]: golden })}>
+ <div className={`${cn(styles.date, { [styles['date-golden']]: golden })} text-sm`}>
<div>{DATE}</div>
</div>
- <div className={cn(styles.url, { [styles['url-golden']]: golden })}>{siteUrlForTicket}</div>
+ {/* <div className={cn(styles.url, { [styles['url-golden']]: golden })}>{siteUrlForTicket}</div> */}
</div>
)
}
diff --git a/apps/www/components/LaunchWeek/Ticket/ticket-profile.tsx b/apps/www/components/LaunchWeek/Ticket/ticket-profile.tsx
index 5fd55398f0a..45f31c60c0b 100644
--- a/apps/www/components/LaunchWeek/Ticket/ticket-profile.tsx
+++ b/apps/www/components/LaunchWeek/Ticket/ticket-profile.tsx
@@ -41,9 +41,9 @@ export default function TicketProfile({
)} dark:text-white`}
>
<span
- className={cn(styles.skeleton, styles.wrapper, {
+ className={`${cn(styles.skeleton, styles.wrapper, {
[styles.show]: ticketGenerationState === 'loading',
- })}
+ })} text-4xl`}
>
{name || username || 'Your Name'}
</span>
@@ -54,13 +54,21 @@ export default function TicketProfile({
[styles.show]: ticketGenerationState === 'loading',
})}
>
- <span className={cn(styles.githubIcon, { [styles['githubIcon-golden']]: golden })}>
+ <span className={`${golden ? 'text-white' : 'text-scale-1100'}`}>
{/* <GithubIcon
color={golden ? 'var(--gold-primary)' : 'var(--secondary-color)'}
size={20 * size}
/> */}
+ {username ? `@${username}` : <>username</>}
</span>
- {username ? `@${username}` : <>username</>}
+
+ <img
+ alt="Supabase disconnected badge"
+ src={`/images/launchweek/supabadge-${
+ username ? 'connected' : golden ? 'gold' : 'disconnected'
+ }.svg`}
+ className="ml-2"
+ />
</span>
</p>
</div>
diff --git a/apps/www/components/LaunchWeek/Ticket/ticket.tsx b/apps/www/components/LaunchWeek/Ticket/ticket.tsx
index cdde89fe351..359dbea8d28 100644
--- a/apps/www/components/LaunchWeek/Ticket/ticket.tsx
+++ b/apps/www/components/LaunchWeek/Ticket/ticket.tsx
@@ -76,6 +76,8 @@ export default function Ticket({ username, name, ticketNumber, sharePage, golden
</>
) : golden ? (
<>Claim your ticket with GitHub and Tweet it to redeem your swag pack!</>
+ ) : username ? (
+ <>Here is your unique ticket image to brag on socials.</>
) : (
<>
This means you’re in. Generate a unique ticket image with your GitHub profile cause
diff --git a/apps/www/lib/constants.ts b/apps/www/lib/constants.ts
index f6c16abf7f4..d436a5d5a10 100644
--- a/apps/www/lib/constants.ts
+++ b/apps/www/lib/constants.ts
@@ -9,7 +9,7 @@ export const SITE_URL = process.env.NEXT_PUBLIC_VERCEL_URL
export const SITE_ORIGIN = new URL(SITE_URL).origin
export const TWITTER_USER_NAME = 'supabase'
export const COOKIE = 'supa-launch-week-ticke-user-id'
-export const DATE = 'December 12 8:00 PT | 11:00 ET'
+export const DATE = 'December 12th 2022'
export const TWEET_TEXT = 'Got my ticket for #SupaLaunchWeek 6!'
export const TWEET_TEXT_GOLDEN = `Woop! I got a Golden Ticket for #SupaLaunchWeek 6! SupaSwag on its way!`
export const SITE_NAME = 'Supabase'
diff --git a/apps/www/public/images/launchweek/supabadge-connected.svg b/apps/www/public/images/launchweek/supabadge-connected.svg
new file mode 100644
index 00000000000..dc9995463b2
--- /dev/null
+++ b/apps/www/public/images/launchweek/supabadge-connected.svg
@@ -0,0 +1,14 @@
+<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M10.6005 1.39415C11.3781 0.632567 12.6219 0.632567 13.3995 1.39415L14.9615 2.92406C15.3301 3.28516 15.8241 3.48978 16.3402 3.49514L18.5265 3.51783C19.6148 3.52912 20.4943 4.40863 20.5056 5.49696L20.5283 7.68327C20.5337 8.19931 20.7383 8.6933 21.0994 9.06198L22.6293 10.624C23.3909 11.4015 23.3909 12.6453 22.6293 13.4229L21.0994 14.9849C20.7383 15.3536 20.5337 15.8476 20.5283 16.3636L20.5056 18.5499C20.4943 19.6382 19.6148 20.5178 18.5265 20.529L16.3402 20.5517C15.8241 20.5571 15.3301 20.7617 14.9615 21.1228L13.3995 22.6527C12.6219 23.4143 11.3781 23.4143 10.6005 22.6527L9.03854 21.1228C8.66986 20.7617 8.17587 20.5571 7.65984 20.5517L5.47353 20.529C4.38519 20.5178 3.50568 19.6382 3.49439 18.5499L3.4717 16.3636C3.46634 15.8476 3.26173 15.3536 2.90062 14.9849L1.37071 13.4229C0.609129 12.6453 0.60913 11.4015 1.37071 10.624L2.90062 9.06198C3.26173 8.6933 3.46634 8.19931 3.4717 7.68327L3.49439 5.49696C3.50568 4.40863 4.38519 3.52912 5.47353 3.51783L7.65984 3.49514C8.17587 3.48978 8.66986 3.28516 9.03854 2.92406L10.6005 1.39415Z" fill="url(#paint0_linear_214_53007)"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M11.9633 7.62447C11.9574 7.22892 11.4586 7.05917 11.2127 7.36898L7.50057 12.0441C7.06243 12.5959 7.4554 13.4097 8.16 13.4097H11.9945L12.0397 16.4214C12.0456 16.8169 12.5443 16.9867 12.7903 16.6769L16.5024 12.0017C16.9405 11.4499 16.5476 10.6361 15.843 10.6361H11.9831L11.9633 7.62447Z" fill="url(#paint1_linear_214_53007)"/>
+<defs>
+<linearGradient id="paint0_linear_214_53007" x1="12" y1="0.0234375" x2="28.832" y2="29.8425" gradientUnits="userSpaceOnUse">
+<stop stop-color="#3FCF8E"/>
+<stop offset="1" stop-color="#375965"/>
+</linearGradient>
+<linearGradient id="paint1_linear_214_53007" x1="12.0015" y1="7.20898" x2="17.6833" y2="20.5567" gradientUnits="userSpaceOnUse">
+<stop stop-color="white"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+</defs>
+</svg>
diff --git a/apps/www/public/images/launchweek/supabadge-disconnected.svg b/apps/www/public/images/launchweek/supabadge-disconnected.svg
new file mode 100644
index 00000000000..f121eb57e36
--- /dev/null
+++ b/apps/www/public/images/launchweek/supabadge-disconnected.svg
@@ -0,0 +1,14 @@
+<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M10.6005 1.39415C11.3781 0.632567 12.6219 0.632567 13.3995 1.39415L14.9615 2.92406C15.3301 3.28516 15.8241 3.48978 16.3402 3.49514L18.5265 3.51783C19.6148 3.52912 20.4943 4.40863 20.5056 5.49696L20.5283 7.68327C20.5337 8.19931 20.7383 8.6933 21.0994 9.06198L22.6293 10.624C23.3909 11.4015 23.3909 12.6453 22.6293 13.4229L21.0994 14.9849C20.7383 15.3536 20.5337 15.8476 20.5283 16.3636L20.5056 18.5499C20.4943 19.6382 19.6148 20.5178 18.5265 20.529L16.3402 20.5517C15.8241 20.5571 15.3301 20.7617 14.9615 21.1228L13.3995 22.6527C12.6219 23.4143 11.3781 23.4143 10.6005 22.6527L9.03854 21.1228C8.66986 20.7617 8.17587 20.5571 7.65984 20.5517L5.47353 20.529C4.38519 20.5178 3.50568 19.6382 3.49439 18.5499L3.4717 16.3636C3.46634 15.8476 3.26173 15.3536 2.90062 14.9849L1.37071 13.4229C0.609129 12.6453 0.60913 11.4015 1.37071 10.624L2.90062 9.06198C3.26173 8.6933 3.46634 8.19931 3.4717 7.68327L3.49439 5.49696C3.50568 4.40863 4.38519 3.52912 5.47353 3.51783L7.65984 3.49514C8.17587 3.48978 8.66986 3.28516 9.03854 2.92406L10.6005 1.39415Z" stroke="url(#paint0_linear_214_53368)" stroke-width="0.8"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M11.9633 7.62447C11.9574 7.22892 11.4586 7.05917 11.2127 7.36898L7.50057 12.0441C7.06243 12.5959 7.4554 13.4097 8.16 13.4097H11.9945L12.0397 16.4214C12.0456 16.8169 12.5443 16.9867 12.7903 16.6769L16.5024 12.0017C16.9405 11.4499 16.5476 10.6361 15.843 10.6361H11.9831L11.9633 7.62447Z" fill="url(#paint1_linear_214_53368)"/>
+<defs>
+<linearGradient id="paint0_linear_214_53368" x1="-2.00351" y1="0.023438" x2="32.1363" y2="22.3219" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.8"/>
+<stop offset="1" stop-color="#F4FFFA" stop-opacity="0.5"/>
+</linearGradient>
+<linearGradient id="paint1_linear_214_53368" x1="3.68646" y1="9.19118" x2="19.6319" y2="16.8359" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.8"/>
+<stop offset="1" stop-color="white" stop-opacity="0.5"/>
+</linearGradient>
+</defs>
+</svg>
diff --git a/apps/www/public/images/launchweek/supabadge-gold.svg b/apps/www/public/images/launchweek/supabadge-gold.svg
new file mode 100644
index 00000000000..583db3b4f47
--- /dev/null
+++ b/apps/www/public/images/launchweek/supabadge-gold.svg
@@ -0,0 +1,18 @@
+<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M10.8804 1.67991C11.5025 1.07065 12.4975 1.07065 13.1196 1.67991L14.6816 3.20982C15.124 3.64315 15.7168 3.88869 16.336 3.89512L18.5223 3.91781C19.393 3.92684 20.0966 4.63045 20.1056 5.50111L20.1283 7.68742C20.1348 8.30667 20.3803 8.89946 20.8136 9.34187L22.3435 10.9039C22.9528 11.5259 22.9528 12.521 22.3435 13.143L20.8136 14.705C20.3803 15.1474 20.1348 15.7402 20.1283 16.3595L20.1056 18.5458C20.0966 19.4164 19.393 20.12 18.5223 20.1291L16.336 20.1518C15.7168 20.1582 15.124 20.4037 14.6816 20.8371L13.1196 22.367C12.4975 22.9762 11.5025 22.9762 10.8804 22.367L9.31843 20.8371C8.87602 20.4037 8.28323 20.1582 7.66399 20.1518L5.47768 20.1291C4.60701 20.12 3.9034 19.4164 3.89437 18.5458L3.87168 16.3595C3.86525 15.7402 3.61971 15.1474 3.18638 14.705L1.65647 13.143C1.04721 12.521 1.04721 11.5259 1.65647 10.9039L3.18638 9.34187C3.61971 8.89946 3.86525 8.30667 3.87168 7.68742L3.89437 5.50111C3.9034 4.63045 4.60701 3.92684 5.47768 3.91781L7.66399 3.89512C8.28323 3.88869 8.87602 3.64315 9.31843 3.20982L10.8804 1.67991Z" fill="url(#paint0_linear_524_60522)" stroke="url(#paint1_linear_524_60522)" stroke-width="0.8"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M11.9633 7.62447C11.9574 7.22892 11.4586 7.05917 11.2127 7.36898L7.50057 12.0441C7.06243 12.5959 7.4554 13.4097 8.16 13.4097H11.9945L12.0397 16.4214C12.0456 16.8169 12.5443 16.9867 12.7903 16.6769L16.5024 12.0017C16.9405 11.4499 16.5476 10.6361 15.843 10.6361H11.9831L11.9633 7.62447Z" fill="url(#paint2_linear_524_60522)"/>
+<defs>
+<linearGradient id="paint0_linear_524_60522" x1="12" y1="0.0234375" x2="12" y2="24.0234" gradientUnits="userSpaceOnUse">
+<stop stop-color="#FFBD13"/>
+<stop offset="1" stop-color="#9C7000"/>
+</linearGradient>
+<linearGradient id="paint1_linear_524_60522" x1="12" y1="13.8088" x2="12" y2="24.0234" gradientUnits="userSpaceOnUse">
+<stop stop-color="white"/>
+<stop offset="1" stop-color="#FFBD14"/>
+</linearGradient>
+<linearGradient id="paint2_linear_524_60522" x1="12.0015" y1="7.20898" x2="17.6833" y2="20.5567" gradientUnits="userSpaceOnUse">
+<stop stop-color="white"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+</defs>
+</svg>