mirror of
https://github.com/supabase/supabase.git
synced 2026-10-13 21:29:08 +03:00
lw7: add golden background to index page
This commit is contained in:
1 parent
9e390a259a
commit
fdeeae5db4
5 files changed
+14
-13
No files matched your search
@@ -8,7 +8,7 @@ export default function LaunchWeekPrizeSection({ className }: { className?: stri
|
||||
const finalAnimationState = { y: 0, opacity: 1 }
|
||||
|
||||
return (
|
||||
<div className={[className].join(' ')}>
|
||||
<div id="lw-7-prizes" className={[className].join(' ')}>
|
||||
<div className="">
|
||||
<div className="text-center relative z-10 text-white">
|
||||
<motion.div
|
||||
@@ -50,7 +50,7 @@ export default function LaunchWeekPrizeSection({ className }: { className?: stri
|
||||
<h2 className="text-4xl">
|
||||
Get your <span className="gradient-text-pink-500">winning ticket</span>
|
||||
</h2>
|
||||
<p className="radial-gradient-text-scale-500" id="lw-7-prizes">
|
||||
<p className="radial-gradient-text-scale-500">
|
||||
Mark your calendars for April 9th and join us on Discord for Launch Week 7's final day
|
||||
to find out if you're one of the lucky winners. Get sharing!
|
||||
</p>
|
||||
|
||||
@@ -34,9 +34,6 @@ export function TicketBrickWallRow({ users, reverse, xOffset = 250 }: Props) {
|
||||
<Link href={`/launch-week/tickets/${user.username}`} key={user.username}>
|
||||
<a className="relative w-[230px] md:w-[450px] rounded-lg md:rounded-2xl overflow-hidden transform scale-100 md:hover:scale-[101%] transition-transform">
|
||||
<div className="relative inset-0 w-full pt-[50%] transform scale-[120%]">
|
||||
<span className="absolute inset-0 flex items-center justify-center text-white">
|
||||
{user.username}
|
||||
</span>
|
||||
<Image
|
||||
src={getOgUrl(user.username!, !!user.golden)}
|
||||
alt={user.username}
|
||||
|
||||
@@ -155,7 +155,7 @@ export default function Ticket({
|
||||
) : (
|
||||
<p>
|
||||
We have some fantastic swag up for grabs, including 3 limited-edition
|
||||
mechanical keyboard that you won't want to miss.
|
||||
mechanical keyboards that you won't want to miss.
|
||||
</p>
|
||||
)}
|
||||
</>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { useState } from 'react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { PageState, ConfDataContext, UserData } from './hooks/use-conf-data'
|
||||
import Ticket from './ActualTicket'
|
||||
import ConfContainer from './conf-container'
|
||||
import Form from './form'
|
||||
import { SupabaseClient, Session } from '@supabase/supabase-js'
|
||||
|
||||
@@ -23,6 +22,10 @@ export default function Conf({
|
||||
const [userData, setUserData] = useState<UserData>(defaultUserData)
|
||||
const [pageState, setPageState] = useState<PageState>(defaultPageState)
|
||||
|
||||
useEffect(() => {
|
||||
localStorage.setItem('isGolden', !!userData?.golden ? 'true' : 'false')
|
||||
}, [userData])
|
||||
|
||||
return (
|
||||
<ConfDataContext.Provider
|
||||
value={{
|
||||
|
||||
@@ -34,6 +34,7 @@ export default function TicketHome({ users }: Props) {
|
||||
const { query } = useRouter()
|
||||
const ticketNumber = query.ticketNumber?.toString()
|
||||
const bgImageId = query.bgImageId?.toString()
|
||||
const [isGolden, setIsGolden] = useState(false)
|
||||
|
||||
const defaultUserData = {
|
||||
id: query.id?.toString(),
|
||||
@@ -70,6 +71,9 @@ export default function TicketHome({ users }: Props) {
|
||||
|
||||
useEffect(() => {
|
||||
document.body.className = 'dark bg-[#1C1C1C]'
|
||||
if (typeof window !== 'undefined') {
|
||||
setIsGolden(localStorage?.getItem('isGolden') === 'true' ?? false)
|
||||
}
|
||||
}, [])
|
||||
|
||||
return (
|
||||
@@ -79,7 +83,7 @@ export default function TicketHome({ users }: Props) {
|
||||
openGraph={{
|
||||
title: `Get your #SupaLaunchWeek Ticket`,
|
||||
description: description,
|
||||
url: `${SITE_URL}/tickets`,
|
||||
url: `${SITE_URL}`,
|
||||
images: [
|
||||
{
|
||||
url: `${SITE_ORIGIN}/images/launchweek/seven/launch-week-7.jpg`,
|
||||
@@ -115,10 +119,7 @@ export default function TicketHome({ users }: Props) {
|
||||
<LW7BgGraphic />
|
||||
</div>
|
||||
<div
|
||||
className={[
|
||||
'bg-lw7-gradient absolute inset-0 z-0',
|
||||
defaultUserData?.golden && 'gold',
|
||||
].join(' ')}
|
||||
className={['bg-lw7-gradient absolute inset-0 z-0', isGolden && 'gold'].join(' ')}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in new issue
Block a user