chore: update icons and refactor

This commit is contained in:
Francesco Sansalvadore committed 2023-04-06 16:40:09 +02:00
1 parent 8987ad5fb7
commit 3a1e4f96ff
7 files changed
+488 -403

No files matched your search

@@ -0,0 +1,237 @@
import { Badge } from 'ui'
import styles from '../styles/launchWeek7.module.css'
import Link from 'next/link'
export const PencilSvg = () => (
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M3.21792 11.2469L11.8015 2.66333L14.0953 4.95709L5.51167 13.5407M3.21792 11.2469L2.34219 14.4164L5.51167 13.5407M3.21792 11.2469L5.51167 13.5407"
stroke="#A69DC9"
strokeMiterlimit="10"
strokeLinejoin="bevel"
/>
</svg>
)
export const DocsSvg = () => (
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M4.96289 9.48618H10.9629M4.96289 7.48618H10.9629M4.96289 11.4862H8.96289M3 2.00034V13.9998H12.9996V5.60113L9.38156 2.00034H3ZM12.9644 5.58432L9.38004 2L9.38004 5.58432L12.9644 5.58432Z"
stroke="#A69DC9"
strokeMiterlimit="10"
stroke-linejoin="bevel"
/>
</svg>
)
export const PlaySvg = () => (
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M13.4287 8L8.74762 10.7026L4.06653 13.4053L4.06653 8L4.06653 2.59474L8.74762 5.29737L13.4287 8Z"
stroke="#A69DC9"
strokeMiterlimit="10"
strokeLinejoin="bevel"
/>
</svg>
)
export const GithubSvg = () => (
<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M8.2125 1.75781C4.6765 1.75781 1.8125 4.62181 1.8125 8.15781C1.8125 10.9898 3.6445 13.3818 6.1885 14.2298C6.5085 14.2858 6.6285 14.0938 6.6285 13.9258C6.6285 13.7738 6.6205 13.2698 6.6205 12.7338C5.0125 13.0298 4.5965 12.3418 4.4685 11.9818C4.3965 11.7978 4.0845 11.2298 3.8125 11.0778C3.5885 10.9578 3.2685 10.6618 3.8045 10.6538C4.3085 10.6458 4.6685 11.1178 4.7885 11.3098C5.3645 12.2778 6.2845 12.0058 6.6525 11.8378C6.7085 11.4218 6.8765 11.1418 7.0605 10.9818C5.6365 10.8218 4.1485 10.2698 4.1485 7.82181C4.1485 7.12581 4.3965 6.54981 4.8045 6.10181C4.7405 5.94181 4.5165 5.28581 4.8685 4.40581C4.8685 4.40581 5.4045 4.23781 6.6285 5.06181C7.1405 4.91781 7.6845 4.84581 8.2285 4.84581C8.7725 4.84581 9.3165 4.91781 9.8285 5.06181C11.0525 4.22981 11.5885 4.40581 11.5885 4.40581C11.9405 5.28581 11.7165 5.94181 11.6525 6.10181C12.0605 6.54981 12.3085 7.11781 12.3085 7.82181C12.3085 10.2778 10.8125 10.8218 9.3885 10.9818C9.6205 11.1818 9.8205 11.5658 9.8205 12.1658C9.8205 13.0218 9.8125 13.7098 9.8125 13.9258C9.8125 14.0938 9.9325 14.2938 10.2525 14.2298C11.523 13.8009 12.627 12.9844 13.4092 11.8951C14.1913 10.8059 14.6122 9.49877 14.6125 8.15781C14.6125 4.62181 11.7485 1.75781 8.2125 1.75781Z"
fill="#A69DC9"
/>
</svg>
)
export const LinkSvg = () => (
<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M6.875 4.0013H4.20833C3.47195 4.0013 2.875 4.59826 2.875 5.33464V12.0013C2.875 12.7377 3.47195 13.3346 4.20833 13.3346H10.875C11.6114 13.3346 12.2083 12.7377 12.2083 12.0013V9.33464M9.54167 2.66797H13.5417M13.5417 2.66797V6.66797M13.5417 2.66797L6.875 9.33464"
stroke="#A69DC9"
stroke-width="1"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
)
export const HackernewsSvg = () => (
<svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M22.7969 0.878906H0.703125V22.9727H22.7969V0.878906Z" fill="#A69DC9" />
<path
d="M11.0093 13.3976L7.17969 6.25391H8.94719L11.1566 10.7463C11.1566 10.8199 11.2302 10.8936 11.3039 10.9672C11.3775 11.0409 11.3775 11.1145 11.4511 11.2618L11.5248 11.3355V11.4091C11.5984 11.5564 11.5984 11.6301 11.6721 11.7773C11.7457 11.851 11.7457 11.9983 11.8194 12.0719C11.893 11.851 12.0403 11.7037 12.114 11.4091C12.1876 11.1882 12.3349 10.9672 12.4822 10.7463L14.6916 6.25391H16.3118L12.4822 13.4712V18.0372H11.0093V13.3976Z"
fill="#1C1C1C"
/>
</svg>
)
export const SmallCard = ({
className,
bgGradient = false,
children,
}: {
className?: string
bgGradient?: boolean
children: any
}) => (
<div
className={[
'relative p-[1px] bg-gradient-to-b from-[#48484880] to-[#1C1C1C60] rounded-2xl overflow-hidden shadow-lg',
className,
].join(' ')}
>
<div
className={[
'rounded-2xl text-sm px-6 py-4 flex flex-col sm:flex-row justify-between items-center backdrop-blur-md',
bgGradient ? styles['lw7-article-card-gradient'] : 'bg-[#1c1c1c99]',
].join(' ')}
>
{children}
</div>
</div>
)
export const StyledArticleBadge = ({
className,
children,
}: {
className?: string
children: any
}) => (
<div
className={[
'relative bg-gradient-to-br p-[1.5px] from-[#F4FFFA90] to-[#7E7AAD] overflow-hidden rounded-full',
className,
].join(' ')}
>
<div className="!bg-[#1C1C1C] rounded-full !py-1 !px-4 w-full inset-[1px] text-sm border-none dark:from-white dark:to-[#6453C5] dark:border-none backdrop-blur-md">
<span className="text-sm text-transparent bg-clip-text bg-gradient-to-r from-[#F4FFFA] to-[#7E7AAD]">
{children}
</span>
</div>
</div>
)
export const AccordionHeader = ({ date, day, title, shipped }: any) => {
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">
<Badge
className={`relative inset-0 !bg-transparent !py-1 !px-4 h-fit backdrop-blur-md ${
shipped
? 'bg-gradient-to-br from-[#2A1E6C] to-[#2A1E6C00] dark:from-[#2A1E6C] dark:to-[#2A1E6C00] !border-[#6044FF40] dark:!border-[#6044FF40]'
: '!border-[#FFFFFF20] dark:!border-[#FFFFFF20]'
}`}
>
<span className="text-transparent text-sm font-normal bg-clip-text bg-gradient-to-r from-[#F4FFFA] to-[#675FA7]">
{shipped ? 'Shipped' : 'Coming Soon'}
</span>
</Badge>
<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>
)}
</span>
</div>
{shipped && <span className="text-scale-1200 text-lg mt-3 sm:mt-0">{title}</span>}
</div>
)
}
export const ChipLink = ({ href, children }: { href: string; children: any }) => (
<Link href={href} target="_blank" rel="noopener">
<a className="flex items-center border border-slate-400 bg-gradient-to-r text-black dark:text-white from-[#464444] to-[#191919] hover:from-[#4e4e4e] hover:to-[#191919] rounded-full text-sm py-2 pl-3 pr-2">
{children}
</a>
</Link>
)
export const SectionButtons = ({
blog,
docs,
video,
github,
url,
hackernews,
}: {
blog?: string
docs?: string
video?: string
github?: string
url?: string
hackernews?: string
}) => {
return (
<div className="flex gap-2 z-10">
{!!blog && (
<ChipLink href={blog}>
Blog post
<div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">
<PencilSvg />
</div>
</ChipLink>
)}
{!!docs && (
<ChipLink href={docs}>
Docs
<div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">
<DocsSvg />
</div>
</ChipLink>
)}
{!!video && (
<ChipLink href={video}>
Video
<div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">
<PlaySvg />
</div>
</ChipLink>
)}
{!!github && (
<ChipLink href={github}>
View on Github
<div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">
<GithubSvg />
</div>
</ChipLink>
)}
{!!url && (
<ChipLink href={url}>
Read
<div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">
<LinkSvg />
</div>
</ChipLink>
)}
{hackernews && (
<ChipLink href={hackernews}>
Read
<div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">
<HackernewsSvg />
</div>
</ChipLink>
)}
</div>
)
}
export const CartTitle = ({ children }: { children: any }) => (
<span className="text-transparent bg-clip-text bg-gradient-to-r from-[#F4FFFA] to-[#675FA7">
{children}
</span>
)
export default {
AccordionHeader,
DocsSvg,
PencilSvg,
PlaySvg,
CartTitle,
ChipLink,
SectionButtons,
SmallCard,
StyledArticleBadge,
}
@@ -1,194 +1,33 @@
// @ts-nocheck
import Image from 'next/image'
import { useEffect } from 'react'
import { Accordion } from 'ui'
import _days from '~/components/LaunchWeek/lw7_days.json'
import days, { WeekDayProps, endOfLW7 } from '~/components/LaunchWeek/lw7_days'
import SectionContainer from '~/components/Layouts/SectionContainer'
import {
AccordionHeader,
CartTitle,
ChipLink,
PencilSvg,
PlaySvg,
SectionButtons,
SmallCard,
StyledArticleBadge,
} from './components'
import { createClient, SupabaseClient } from '@supabase/supabase-js'
import { useEffect, useState } from 'react'
import { Accordion, Badge } from 'ui'
import styleUtils from './styles/utils7.module.css'
import styles from './styles/launchWeek7.module.css'
import Link from 'next/link'
interface WeekDayProps {
title: string
shipped: boolean
date: string
publishedAt: string
description: string
d: number
dd: string
youtube_id: string
blogpost: string
docs: string
steps: {
title: string
blog: string
isNew: boolean
description: string
}[]
}
const days = _days as WeekDayProps[]
const PencilSvg = () => (
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M3.21792 11.2469L11.8015 2.66333L14.0953 4.95709L5.51167 13.5407M3.21792 11.2469L2.34219 14.4164L5.51167 13.5407M3.21792 11.2469L5.51167 13.5407"
// stroke="#6453C5"
stroke="#A69DC9"
strokeMiterlimit="10"
strokeLinejoin="bevel"
/>
</svg>
)
const DocsSvg = () => (
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M4.96289 9.48618H10.9629M4.96289 7.48618H10.9629M4.96289 11.4862H8.96289M3 2.00034V13.9998H12.9996V5.60113L9.38156 2.00034H3ZM12.9644 5.58432L9.38004 2L9.38004 5.58432L12.9644 5.58432Z"
// stroke="#6453C5"
stroke="#A69DC9"
strokeMiterlimit="10"
stroke-linejoin="bevel"
/>
</svg>
)
const PlaySvg = () => (
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M13.4287 8L8.74762 10.7026L4.06653 13.4053L4.06653 8L4.06653 2.59474L8.74762 5.29737L13.4287 8Z"
// stroke="#6453C5"
stroke="#A69DC9"
strokeMiterlimit="10"
strokeLinejoin="bevel"
/>
</svg>
)
const SmallCard = ({ className, children, bgGradient = false }) => (
<div className="relative p-[1px] bg-gradient-to-b from-[#48484880] to-[#1C1C1C60] rounded-2xl overflow-hidden shadow-lg">
<div
className={[
'rounded-2xl text-sm px-6 py-4 flex flex-col sm:flex-row justify-between items-center backdrop-blur-md',
bgGradient ? styles['lw7-article-card-gradient'] : 'bg-[#1c1c1c99]',
className,
].join(' ')}
>
{children}
</div>
</div>
)
const StyledArticleBadge = ({ className, children }) => (
<div
className={[
'relative bg-gradient-to-br p-[1.5px] from-[#F4FFFA90] to-[#7E7AAD] overflow-hidden rounded-full',
className,
].join(' ')}
>
<div className="!bg-[#1C1C1C] rounded-full !py-1 !px-4 w-full inset-[1px] text-sm border-none dark:from-white dark:to-[#6453C5] dark:border-none backdrop-blur-md">
<span className="text-sm text-transparent bg-clip-text bg-gradient-to-r from-[#F4FFFA] to-[#7E7AAD]">
{children}
</span>
</div>
</div>
)
export default function LW7Releases() {
const [supabase, setSupabase] = useState<SupabaseClient | null>(null)
useEffect(() => {
if (!supabase) {
setSupabase(
createClient(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!
)
)
}
}, [])
const [preRelease, day1, day2, day3, day4, day5] = days
const publishedSections =
days
.filter((day: WeekDayProps) => Date.parse(day.publishedAt) <= Date.now())
.map((day: WeekDayProps) => day.d.toString()) ?? []
useEffect(() => {
document.body.className = 'dark bg-[#1C1C1C]'
}, [])
const AccordionHeader = ({ date, day, title, shipped }: any) => {
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">
<Badge
className={`relative inset-0 !bg-transparent !py-1 !px-4 h-fit backdrop-blur-md ${
shipped
? 'bg-gradient-to-br from-[#2A1E6C] to-[#2A1E6C00] dark:from-[#2A1E6C] dark:to-[#2A1E6C00] !border-[#6044FF40] dark:!border-[#6044FF40]'
: '!border-[#FFFFFF20] dark:!border-[#FFFFFF20]'
}`}
>
<span className="text-transparent text-sm font-normal bg-clip-text bg-gradient-to-r from-[#F4FFFA] to-[#675FA7]">
{shipped ? 'Shipped' : 'Coming Soon'}
</span>
</Badge>
<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>
)}
</span>
</div>
{shipped && <span className="text-scale-1200 text-lg mt-3 sm:mt-0">{title}</span>}
</div>
)
}
const SectionButtons = ({ blog, docs, video }) => {
return (
<div className="flex gap-2 z-10">
<a href={blog} target="_blank" rel="noopener">
<div className="flex items-center border border-slate-400 bg-gradient-to-r from-[#fcfcfc] to-[#f2f2f2] hover:to-[#d5d5d5] text-black dark:text-white dark:from-[#191919] dark:to-[#464444] dark:hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2">
Blog post
<div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">
<PencilSvg />
</div>
</div>
</a>
{docs && (
<a href={docs} target="_blank" rel="noopener">
<div className="flex items-center border border-slate-400 bg-gradient-to-r from-[#fcfcfc] to-[#f2f2f2] hover:to-[#d5d5d5] text-black dark:text-white dark:from-[#191919] dark:to-[#464444] dark:hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2">
Docs
<div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">
<DocsSvg />
</div>
</div>
</a>
)}
{video && (
<a href={video} target="_blank" rel="noopener">
<div className="flex items-center border border-slate-400 bg-gradient-to-r from-[#fcfcfc] to-[#f2f2f2] hover:to-[#d5d5d5] text-black dark:text-white dark:from-[#191919] dark:to-[#464444] dark:hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2">
Video
<div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">
<PlaySvg />
</div>
</div>
</a>
)}
</div>
)
}
const [preRelease, day1, day2, day3, day4, day5] = days
const publishedSections =
days
.filter(
(day) =>
// Date.parse(day.publishedAt) <= Date.now()
true
)
.map((day) => day.d.toString()) ?? []
const prereleaseShipped = Date.parse(preRelease.publishedAt) <= Date.now()
const day1Shipped = Date.parse(day1.publishedAt) <= Date.now()
const day2Shipped = Date.parse(day2.publishedAt) <= Date.now()
@@ -196,13 +35,23 @@ export default function LW7Releases() {
const day4Shipped = Date.parse(day4.publishedAt) <= Date.now()
const day5Shipped = Date.parse(day5.publishedAt) <= Date.now()
const isHackathonLive = prereleaseShipped && Date.parse(endOfLW7) >= Date.now()
return (
<>
<SectionContainer className="!py-0 ">
<div className="grid grid-cols-1 xl:grid-cols-2 gap-4">
<SmallCard bgGradient>
<div className="grid grid-cols-1 gap-4">
<SmallCard
bgGradient
className={[isHackathonLive && 'from-[#4635A7] to-[#A69DC920]'].join(' ')}
>
<div className="relative flex items-center mb-4 sm:mb-0">
<div className="flex min-w-[20px]">
<div
className={[
'flex min-w-[20px] opacity-50',
isHackathonLive && 'opacity-pulse',
].join(' ')}
>
<svg
width="21"
height="21"
@@ -223,51 +72,12 @@ export default function LW7Releases() {
</div>
</div>
<div className="flex gap-2 z-10">
<Link href={'/blog/launch-week-7-hackathon'} target="_blank" rel="noopener">
<a>
<div className="flex items-center border border-slate-400 bg-gradient-to-r from-[#34323210] to-[#FFFFFF10] hover:to-[#d5d5d5] text-black dark:text-white dark:from-[#191919] dark:to-[#464444] dark:hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2">
Blog post
<div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">
<PencilSvg />
</div>
</div>
</a>
</Link>
</div>
</SmallCard>
<SmallCard bgGradient>
<div className="relative flex items-center mb-4 sm:mb-0">
{/* <div className="flex min-w-[20px]">
<svg
width="21"
height="21"
viewBox="0 0 21 21"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M5.55025 3.97258C5.94078 4.36311 5.94078 4.99627 5.55025 5.38679C2.81658 8.12046 2.81658 12.5526 5.55025 15.2863C5.94078 15.6768 5.94078 16.31 5.55025 16.7005C5.15973 17.091 4.52656 17.091 4.13604 16.7005C0.62132 13.1858 0.62132 7.4873 4.13604 3.97258C4.52656 3.58206 5.15973 3.58206 5.55025 3.97258ZM15.4498 3.97281C15.8403 3.58229 16.4735 3.58229 16.864 3.97281C20.3787 7.48753 20.3787 13.186 16.864 16.7007C16.4735 17.0913 15.8403 17.0913 15.4498 16.7007C15.0592 16.3102 15.0592 15.677 15.4498 15.2865C18.1834 12.5529 18.1834 8.1207 15.4498 5.38703C15.0592 4.9965 15.0592 4.36334 15.4498 3.97281ZM8.37869 6.80101C8.76921 7.19153 8.76921 7.8247 8.37869 8.21522C7.20711 9.38679 7.20711 11.2863 8.37869 12.4579C8.76921 12.8484 8.76921 13.4816 8.37868 13.8721C7.98816 14.2626 7.355 14.2626 6.96447 13.8721C5.01185 11.9195 5.01185 8.75363 6.96447 6.80101C7.355 6.41048 7.98816 6.41048 8.37869 6.80101ZM12.6213 6.80124C13.0119 6.41072 13.645 6.41072 14.0355 6.80124C15.9882 8.75386 15.9882 11.9197 14.0355 13.8723C13.645 14.2628 13.0119 14.2628 12.6213 13.8723C12.2308 13.4818 12.2308 12.8486 12.6213 12.4581C13.7929 11.2865 13.7929 9.38703 12.6213 8.21545C12.2308 7.82493 12.2308 7.19176 12.6213 6.80124ZM10.5 9.33677C11.0523 9.33677 11.5 9.78449 11.5 10.3368V10.3468C11.5 10.8991 11.0523 11.3468 10.5 11.3468C9.94772 11.3468 9.5 10.8991 9.5 10.3468V10.3368C9.5 9.78449 9.94772 9.33677 10.5 9.33677Z"
fill="#F2F2F2"
/>
</svg>
</div> */}
<div className="flex flex-col lg:flex-row">
<span className="text-black dark:text-white mr-2">SupaClub</span>
</div>
</div>
<div className="flex gap-2 z-10">
<Link href={'/blog/supaclub'} target="_blank" rel="noopener">
<a>
<div className="flex items-center border border-slate-400 bg-gradient-to-r from-[#34323210] to-[#FFFFFF10] hover:to-[#d5d5d5] text-black dark:text-white dark:from-[#191919] dark:to-[#464444] dark:hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2">
Blog post
<div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">
<PencilSvg />
</div>
</div>
</a>
</Link>
<ChipLink href={'/blog/launch-week-7-hackathon'}>
Blog post
<div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">
<PencilSvg />
</div>
</ChipLink>
</div>
</SmallCard>
</div>
@@ -279,7 +89,7 @@ export default function LW7Releases() {
size="large"
className="text-scale-900 dark:text-white"
justified={false}
bordered={false}
// bordered={false}
chevronAlign="right"
defaultValue={publishedSections}
>
@@ -320,7 +130,7 @@ export default function LW7Releases() {
<div
className={`
relative overflow-hidden group/3 flex-1 flex flex-col items-center justify-between
basis-1/2 lg:basis-1/3 border rounded-xl h-full bg-no-repeat p-14 text-2xl bg-contain
basis-1/2 lg:basis-1/3 border rounded-xl h-full bg-no-repeat py-14 lg:px-10 text-2xl bg-contain
`}
>
<div
@@ -331,14 +141,12 @@ export default function LW7Releases() {
></div>
<div className="flex flex-col items-center gap-2 min-w-[300px]">
<StyledArticleBadge>New</StyledArticleBadge>
<span className="text-black dark:text-white">
{preRelease.steps[1].title}
</span>
<CartTitle>{preRelease.steps[1].title}</CartTitle>
<p className="text-sm text-slate-900">{preRelease.steps[1].description}</p>
</div>
<SectionButtons
docs={preRelease.steps[1].docs}
blog={preRelease.steps[1].blog}
github={preRelease.steps[1].github}
url={preRelease.steps[1].url}
/>
</div>
</div>
@@ -164,7 +164,7 @@ export default function Ticket({
href={`${SITE_URL}/${username ? '?referral=' + username : ''}`}
className={`flex items-center justify-center gap-2 text-[#2e2e2e]`}
>
Get your ticket
Go to Launch Week 7
</a>
</div>
</>
@@ -1,146 +0,0 @@
[
{
"title": "AI generated OG images",
"shipped": true,
"date": "",
"publishedAt": "2023-04-04T07:00:00.000-07:00",
"description": "AI generated OG images",
"d": 0,
"dd": "Pre-release",
"youtube_id": "",
"blogpost": "https://supabase.com/blog/new-supabase-docs-built-with-nextjs",
"docs": "https://supabase.com/docs",
"steps": [
{
"title": "AI generated OG images",
"blog": "/blog/",
"isNew": false,
"description": ""
},
{
"title": "Supavisor",
"blog": "/blog/",
"docs": "/docs",
"isNew": true,
"description": ""
}
]
},
{
"title": "Self-hosted Logs & observability",
"shipped": false,
"date": "10 Apr 2023",
"publishedAt": "2023-04-10T07:00:00.000-07:00",
"description": "Supabase Docs",
"d": 1,
"dd": "Monday",
"youtube_id": "OpPOaJI_Z28",
"blogpost": "https://supabase.com/blog/new-supabase-docs-built-with-nextjs",
"docs": "https://supabase.com/docs",
"steps": [
{
"title": "Supabase Docs",
"blog": "/blog/new-supabase-docs-built-with-nextjs",
"docs": "/docs",
"isNew": true,
"description": ""
}
]
},
{
"title": "Self-hosted Edge Functions",
"shipped": false,
"date": "11 Apr 2023",
"publishedAt": "2023-04-11T07:00:00.000-07:00",
"description": "Image Transformations",
"d": 2,
"dd": "Tuesday",
"youtube_id": "iqZlPtl_b-I",
"blogpost": "https://supabase.com/blog",
"docs": "https://supabase.com/docs",
"steps": [
{
"title": "Image Transformations",
"blog": "",
"docs": "",
"isNew": true,
"description": ""
},
{
"title": "Smart CDN",
"description": "Faster asset delivery, now even faster.",
"blog": "/blog/storage-image-resizing-smart-cdn",
"docs": "/docs/guides/storage/cdn",
"isNew": true
}
]
},
{
"title": "Storage v3 Multipart upload",
"shipped": false,
"date": "12 Apr 2023",
"publishedAt": "2023-04-12T07:00:00.000-07:00",
"description": "Storage v3 Multipart upload",
"d": 3,
"dd": "Wednesday",
"youtube_id": "CGZr5tybW18",
"blogpost": "https://supabase.com/blog",
"docs": "https://supabase.com/docs",
"steps": [
{
"title": "Storage v3 Multipart upload",
"blog": "/blog/mfa-auth-via-rls",
"docs": "/docs/guides/auth/auth-mfa",
"isNew": false,
"description": ""
}
]
},
{
"title": "SSO Support for Projects",
"shipped": false,
"date": "13 Apr 2023",
"publishedAt": "2023-04-13T07:00:00.000-07:00",
"description": "Supabase Wrappers",
"d": 4,
"dd": "Thursday",
"youtube_id": "QA2qC5F-4OU",
"blogpost": "/blog/postgres-foreign-data-wrappers-rust",
"docs": "https://supabase.com/docs",
"steps": [
{
"title": "Supabase Wrappers",
"blog": "/blog/postgres-foreign-data-wrappers-rust",
"docs": "https://supabase.github.io/wrappers/",
"isNew": true,
"description": "Connect Postgres to external systems with Postgres Foreign Data Wrappers"
}
]
},
{
"title": "Community Highlight",
"shipped": false,
"date": "14 Apr 2023",
"publishedAt": "2023-04-14T07:00:00.000-07:00",
"description": "Vault Release",
"d": 5,
"dd": "Friday",
"youtube_id": "6bGQotxisoY",
"blogpost": "https://supabase.com/blog",
"docs": "https://supabase.com/docs",
"steps": [
{
"title": "Vault Release",
"blog": "/blog/vault-now-in-beta",
"isNew": true,
"description": ""
},
{
"title": "Transparent Column Encryption",
"description": "Faster asset delivery, now even faster.",
"blog": "/blog/transparent-column-encryption-with-postgres",
"isNew": true
}
]
}
]
+178
View File
@@ -0,0 +1,178 @@
export interface WeekDayProps {
title: string
shipped: boolean
date: string
publishedAt: string
description: string
d: number
dd: string
youtube_id: string
blogpost: string
docs: string
steps: {
title: string
blog?: string
docs?: string
isNew?: boolean
description?: string
thumb?: string
github?: string
url?: string
youtube_id?: string
}[]
}
export const endOfLW7 = '2023-04-16T23:59:59.999-07:00'
const days: WeekDayProps[] = [
{
title: 'AI generated OG images',
shipped: true,
date: '',
publishedAt: '2023-04-07T07:00:00.000-07:00',
description: 'AI generated OG images',
d: 0,
dd: 'Pre-release',
youtube_id: '',
blogpost: 'https://supabase.com/blog/new-supabase-docs-built-with-nextjs',
docs: 'https://supabase.com/docs',
steps: [
{
title: 'AI generated OG images',
blog: '/blog/',
docs: '',
isNew: false,
description: '',
thumb: '/images/launchweek/seven/day0/ai-images-thumb.png',
},
{
title: 'Supavisor',
github: '/blog/',
},
],
},
{
title: 'Self-hosted Logs & observability',
shipped: false,
date: '10 Apr 2023',
publishedAt: '2023-04-10T07:00:00.000-07:00',
description: 'Supabase Docs',
d: 1,
dd: 'Monday',
youtube_id: 'OpPOaJI_Z28',
blogpost: 'https://supabase.com/blog/new-supabase-docs-built-with-nextjs',
docs: 'https://supabase.com/docs',
steps: [
{
title: 'Supabase Docs',
blog: '/blog/new-supabase-docs-built-with-nextjs',
docs: '/docs',
isNew: true,
description: '',
thumb: '/images/launchweek/seven/day1/self-hosted-logs-thumb.png',
},
],
},
{
title: 'Self-hosted Edge Functions',
shipped: false,
date: '11 Apr 2023',
publishedAt: '2023-04-11T07:00:00.000-07:00',
description: 'Image Transformations',
d: 2,
dd: 'Tuesday',
youtube_id: 'iqZlPtl_b-I',
blogpost: 'https://supabase.com/blog',
docs: 'https://supabase.com/docs',
steps: [
{
title: 'Image Transformations',
blog: '',
docs: '',
isNew: true,
description: '',
thumb: '/images/launchweek/seven/day2/self-hosted-edge-functions-thumb.png',
},
{
title: 'Smart CDN',
description: 'Faster asset delivery, now even faster.',
blog: '/blog/storage-image-resizing-smart-cdn',
docs: '/docs/guides/storage/cdn',
isNew: true,
},
],
},
{
title: 'Storage v3 Multipart upload',
shipped: false,
date: '12 Apr 2023',
publishedAt: '2023-04-12T07:00:00.000-07:00',
description: 'Storage v3 Multipart upload',
d: 3,
dd: 'Wednesday',
youtube_id: 'CGZr5tybW18',
blogpost: 'https://supabase.com/blog',
docs: 'https://supabase.com/docs',
steps: [
{
title: 'Storage v3 Multipart upload',
blog: '/blog/mfa-auth-via-rls',
docs: '/docs/guides/auth/auth-mfa',
isNew: false,
description: '',
thumb: '/images/launchweek/seven/day3/storage-v3-thumb.png',
},
],
},
{
title: 'SSO Support for Projects',
shipped: false,
date: '13 Apr 2023',
publishedAt: '2023-04-13T07:00:00.000-07:00',
description: 'Supabase Wrappers',
d: 4,
dd: 'Thursday',
youtube_id: 'QA2qC5F-4OU',
blogpost: '/blog/postgres-foreign-data-wrappers-rust',
docs: 'https://supabase.com/docs',
steps: [
{
title: 'Supabase Wrappers',
blog: '/blog/postgres-foreign-data-wrappers-rust',
docs: 'https://supabase.github.io/wrappers/',
isNew: true,
description: '',
thumb: '/images/launchweek/seven/day4/SSO-support-thumb.png',
},
],
},
{
title: 'Community Highlight',
shipped: false,
date: '14 Apr 2023',
publishedAt: '2023-04-14T07:00:00.000-07:00',
description: 'Vault Release',
d: 5,
dd: 'Friday',
youtube_id: '6bGQotxisoY',
blogpost: 'https://supabase.com/blog',
docs: 'https://supabase.com/docs',
steps: [
{
title: 'Vault Release',
blog: '/blog/vault-now-in-beta',
isNew: true,
description: '',
thumb: '/images/launchweek/seven/day0/ai-images-thumb.png',
},
{
title: 'Transparent Column Encryption',
description: '',
blog: '/blog/transparent-column-encryption-with-postgres',
isNew: true,
},
],
},
]
export default days
+28 -20
View File
@@ -1,21 +1,28 @@
import { NextSeo } from 'next-seo'
import { GetServerSideProps } from 'next'
import DefaultLayout from '~/components/Layouts/Default'
import SectionContainer from '~/components/Layouts/SectionContainer'
import TicketContainer from '~/components/LaunchWeek/Ticket/TicketContainer'
import { SITE_ORIGIN, SITE_URL } from '~/lib/constants'
import { NextSeo } from 'next-seo'
import { useState, useEffect } from 'react'
import dynamic from 'next/dynamic'
import { useRouter } from 'next/router'
import { createClient, Session, SupabaseClient } from '@supabase/supabase-js'
import { useState, useEffect } from 'react'
import { IconArrowDown } from 'ui'
import LaunchWeekPrizeSection from '~/components/LaunchWeek/LaunchSection/LaunchWeekPrizeSection'
import { LaunchWeekLogoHeader } from '~/components/LaunchWeek/LaunchSection/LaunchWeekLogoHeader'
import { SITE_ORIGIN, SITE_URL } from '~/lib/constants'
import { IconArrowDown } from 'ui'
import DefaultLayout from '~/components/Layouts/Default'
import SectionContainer from '~/components/Layouts/SectionContainer'
import { LaunchWeekLogoHeader } from '~/components/LaunchWeek/LaunchSection/LaunchWeekLogoHeader'
import { UserData } from '~/components/LaunchWeek/Ticket/hooks/use-conf-data'
import TicketBrickWall from '~/components/LaunchWeek/LaunchSection/TicketBrickWall'
import LW7BgGraphic from '../../components/LaunchWeek/LW7BgGraphic'
import CTABanner from '../../components/CTABanner'
import LW7Releases from '../../components/LaunchWeek/Releases/LW7'
import LW7BgGraphic from '~/components/LaunchWeek/LW7BgGraphic'
const TicketContainer = dynamic(() => import('~/components/LaunchWeek/Ticket/TicketContainer'))
const LW7Releases = dynamic(() => import('~/components/LaunchWeek/Releases/LW7'))
const LaunchWeekPrizeSection = dynamic(
() => import('~/components/LaunchWeek/LaunchSection/LaunchWeekPrizeSection')
)
const TicketBrickWall = dynamic(
() => import('~/components/LaunchWeek/LaunchSection/TicketBrickWall')
)
const CTABanner = dynamic(() => import('~/components/CTABanner'))
interface Props {
users: UserData[]
@@ -29,15 +36,16 @@ const supabaseAdmin = createClient(
)
export default function TicketHome({ users }: Props) {
const { query } = useRouter()
const [supabase, setSupabase] = useState<SupabaseClient | null>(null)
const [session, setSession] = useState<Session | null>(null)
const [isGolden, setIsGolden] = useState(false)
const TITLE = 'Supabase LaunchWeek 7'
const DESCRIPTION = 'Supabase Launch Week 7 | 10–14 April 2023'
const OG_IMAGE = `${SITE_ORIGIN}/images/launchweek/seven/launch-week-7-teaser.jpg`
const [supabase, setSupabase] = useState<SupabaseClient | null>(null)
const [session, setSession] = useState<Session | null>(null)
const { query } = useRouter()
const ticketNumber = query.ticketNumber?.toString()
const bgImageId = query.bgImageId?.toString()
const [isGolden, setIsGolden] = useState(false)
const defaultUserData = {
id: query.id?.toString(),
@@ -97,7 +105,7 @@ export default function TicketHome({ users }: Props) {
/>
<DefaultLayout>
<div className="bg-[#1C1C1C] -mt-[65px]">
<div className="relative bg-lw7 pt-20">
<div className="relative bg-lw7 pt-16">
<div className="relative z-10">
<SectionContainer className="flex flex-col justify-around items-center !py-4 md:!py-8 gap-2 md:gap-4 !px-2 !mx-auto">
<LaunchWeekLogoHeader />
@@ -109,8 +117,8 @@ export default function TicketHome({ users }: Props) {
/>
</div>
<SectionContainer className="relative w-full -mt-40 md:-mt-96 z-20 flex flex-col justify-around items-center !py-4 md:!py-8 gap-2 md:gap-4 !mx-auto">
<div className="mb-8">
<SectionContainer className="relative w-full -mt-48 md:mt-[-460px] z-20 flex flex-col justify-around items-center !py-4 md:!py-8 gap-2 md:gap-4 !mx-auto">
<div className="mb-4">
<a href="#lw-7-prizes" className="flex items-center text-white text-sm my-4 gap-4">
Join Hackathon{' '}
<span className="bounce-loop">
+2 -2
View File
@@ -28,7 +28,7 @@
}
.opacity-pulse {
animation: opacity-pulse 3.5s ease-in-out infinite alternate both;
animation: opacity-pulse 0.6s ease-in-out infinite alternate both;
}
.glass-tile-gradient {
@@ -58,7 +58,7 @@
@keyframes opacity-pulse {
0% {
opacity: 0.75;
opacity: 0.4;
}
100% {
opacity: 1;