Skip to content

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

Attempt to make hero for realtime landing page

Joshen Limba9c37817d85
diff --git a/apps/www/pages/realtime/Realtime.module.css b/apps/www/pages/realtime/Realtime.module.css
index dab399b724c..51edc165c48 100644
--- a/apps/www/pages/realtime/Realtime.module.css
+++ b/apps/www/pages/realtime/Realtime.module.css
@@ -1,97 +1,214 @@
-.element {
- animation: element 8s infinite;
+.shape {
+ transform-origin: top left;
+ animation: shape 20s infinite;
}
-@keyframes element {
- 39% {
- border-color: hsla(153, 60%, 28%, 1)
+@keyframes shape {
+ 0%, 5% {
+ opacity: 1;
+ transform: scale(0, 0);
+ border-radius: 0;
+ border-color: hsla(153, 60%, 28%, 1);
+ box-shadow: none;
+ border-width: 3px;
+ }
+ 10%, 37.3% {
+ opacity: 1;
+ transform: scale(1, 1);
+ border-radius: 0;
+ border-color: hsla(153, 60%, 28%, 1);
+ box-shadow: none;
+ border-width: 3px;
+ }
+ 38%, 42% {
+ opacity: 1;
+ transform: scale(1, 1);
+ border-radius: 0px;
+ border-color: #FFFFFF;
+ box-shadow: none;
+ border-width: 3px;
+ }
+ 45%, 48.2% {
+ opacity: 1;
+ transform: scale(1, 1);
+ border-radius: 10px;
+ border-color: #FFFFFF;
+ box-shadow: none;
+ border-width: 3px;
+ }
+ 49%, 71.2% {
+ opacity: 1;
+ transform: scale(1, 1);
+ border-radius: 10px;
+ border-color: hsla(153, 60%, 28%, 1);
+ box-shadow: none;
+ border-width: 3px;
}
- 40% {
- border-color: #FFF;
+ 72%, 74% {
+ opacity: 1;
+ transform: scale(1, 1);
+ border-radius: 10px;
+ border-color: #FFFFFF;
+ box-shadow: none;
+ border-width: 3px;
}
- 75% {
- border-color: #FFF;
+ 76%, 92% {
+ opacity: 1;
+ transform: scale(1, 1);
+ border-radius: 10px;
+ border-color: #FFFFFF;
+ box-shadow: 0px 7px 20px 0px rgba(0,0,0,0.2);
+ border-width: 1.5px;
}
- 80% {
- border-color: hsla(153, 60%, 28%, 1)
+ 94%, 100% {
+ opacity: 1;
+ transform: scale(1, 1);
+ border-radius: 10px;
+ border-color: hsla(153, 60%, 28%, 1);
+ box-shadow: 0px 7px 20px 0px rgba(0,0,0,0.2);
+ border-width: 1.5px;
}
}
-.cursor-1 {
- transform-origin: left;
- animation: cursor-1 8s cubic-bezier(0, 0, 0.2, 1) infinite;
+.button-text {
+ animation: button-text 20s infinite;
}
-@keyframes cursor-1 {
- 20%{
- transform: scale(1) translate(0)
+@keyframes button-text {
+ 0%, 78.5% {
+ opacity: 0;
+ font-family: 'Arial';
+ background-color: transparent;
}
- 25% {
- transform: scale(1) translate(-50px, -20px)
+ 79%, 84% {
+ opacity: 1;
+ font-family: 'Arial';
+ background-color: transparent;
}
- 39% {
- transform: scale(1) translate(-50px, -20px)
+ 84.5%, 88% {
+ opacity: 1;
+ font-family: 'Arial';
+ background-color: rgba(0,0,0,0.4);
}
- 40% {
- transform: scale(0.9) translate(-50px, -20px)
+ 88.1%, 100% {
+ opacity: 1;
+ font-family: 'custom-font';
+ background-color: transparent;
}
- 41% {
- transform: scale(1) translate(-50px, -20px)
+}
+
+.cursor-one {
+ animation: cursor-one 20s infinite;
+}
+
+@keyframes cursor-one {
+ 0% {
+ transform: translate(0px, 0px);
}
- 75% {
- transform: scale(1) translate(-50px, -20px)
+ 2%, 5% {
+ transform: translate(-202px, -63px);
}
- 80% {
- transform: scale(1) translate(0)
+ 10%, 11% {
+ transform: translate(-16px, -15px);
+ }
+ 13%, 100% {
+ transform: translate(0, 0);
}
}
-.cursor-2 {
- animation: cursor-2 6s cubic-bezier(0, 0, 0.2, 1) infinite;
+.cursor-two {
+ animation: cursor-two 20s infinite;
}
-@keyframes cursor-2 {
- 15% {
- transform: translate(0px, 0px)
+@keyframes cursor-two {
+ 0%, 17% {
+ transform: scale(1) translate(-200px, 300px);
+ }
+ 20%, 32% {
+ transform: scale(1) translate(-85px, 89px);
}
- 20% {
- transform: translate(70px, -40px)
+ 34%, 37.1% {
+ transform: scale(1) translate(0px, 0px);
}
- 70% {
- transform: translate(70px, -40px)
+ 37.4%, 37.7% {
+ transform: scale(0.95) translate(0px, 0px);
}
- 75% {
- transform: translate(0px, 0px)
+ 38%, 46% {
+ transform: scale(1) translate(0px, 0px);
+ }
+ 49%, 100% {
+ transform: scale(1) translate(-50px, 100px);
}
}
-.comment-bubble {
- animation: chat 6s cubic-bezier(0, 0, 0.2, 1) infinite;
+.cursor-two-comment {
+ animation: cursor-two-comment 20s infinite;
}
-@keyframes chat {
- 0% {
+@keyframes cursor-two-comment {
+ 0%, 22% {
opacity: 0;
- transform: translateY(5px);
+ transform: scale(0.95) translate(0px, 5px);
+ }
+ 24%, 30% {
+ opacity: 1;
+ transform: scale(1.0) translate(0px, 0px);
}
- 25% {
+ 32%, 100% {
opacity: 0;
- transform: translateY(5px);
+ transform: scale(0.95) translate(0px, 5px);
}
- 30% {
- opacity: 1;
- transform: translateY(0);
+}
+
+.cursor-three {
+ animation: cursor-three 20s infinite;
+}
+
+@keyframes cursor-three {
+ 0%, 50% {
+ transform: scale(1) translate(50px, -250px);
}
- 65% {
- opacity: 1;
- transform: translateY(0);
+ 53%, 66% {
+ transform: scale(1) translate(-40px, -120px);
+ }
+ 68%, 71% {
+ transform: scale(1) translate(0px, 0px);
+ }
+ 71.3%, 71.6% {
+ transform: scale(0.95) translate(0px, 0px);
}
- 70% {
+ 71.9%, 80% {
+ transform: scale(1) translate(0px, 0px);
+ }
+ 82%, 84% {
+ transform: scale(1) translate(-20px, 10px);
+ }
+ 84.5%, 85% {
+ transform: scale(0.95) translate(-20px, 10px);
+ }
+ 85.5%, 91% {
+ transform: scale(1) translate(-20px, 10px);
+ }
+ 93%, 100% {
+ transform: scale(1) translate(0px, -80px)
+ }
+}
+
+.cursor-three-comment {
+ animation: cursor-three-comment 20s infinite;
+}
+
+@keyframes cursor-three-comment {
+ 0%, 56% {
opacity: 0;
- transform: translateY(5px);
+ transform: scale(0.95) translate(0px, 5px);
+ }
+ 58%, 64% {
+ opacity: 1;
+ transform: scale(1.0) translate(0px, 0px);
}
- 100% {
+ 66%, 100% {
opacity: 0;
- transform: translateY(5px);
+ transform: scale(0.95) translate(0px, 5px);
}
}
diff --git a/apps/www/pages/realtime/Realtime.tsx b/apps/www/pages/realtime/Realtime.tsx
index 14bfe9f3122..6435a681f2c 100644
--- a/apps/www/pages/realtime/Realtime.tsx
+++ b/apps/www/pages/realtime/Realtime.tsx
@@ -1,4 +1,4 @@
-import { Button, IconArrowUpRight, IconLink } from '@supabase/ui'
+import { Button, IconArrowUpRight, IconGrid, IconLayers, IconLink, IconMenu } from '@supabase/ui'
// [TODO] These need to be relooked - I'm using multiplayer.dev as a "docs"
import ApiExamples from 'data/products/realtime/api-examples'
@@ -18,8 +18,6 @@ import SectionContainer from '~/components/Layouts/SectionContainer'
import APISection from '~/components/Sections/APISection'
import GithubExamples from '~/components/Sections/GithubExamples'
import ProductHeader from '~/components/Sections/ProductHeader'
-import { CursorClickIcon } from '@heroicons/react/outline'
-import CodeBlock from '~/components/CodeBlock/CodeBlock'
const Cursor = ({ className = '', color = 'none' }) => {
return (
@@ -28,7 +26,7 @@ const Cursor = ({ className = '', color = 'none' }) => {
fill={color}
viewBox="0 0 24 24"
aria-hidden="true"
- className={`h-12 w-12 stroke-black dark:stroke-white ${className}`}
+ className={`h-10 w-10 stroke-black dark:stroke-white ${className}`}
>
<path
strokeLinecap="round"
@@ -114,74 +112,74 @@ function RealtimePage() {
'Sync data across clients by listening to changes in your Database and broadcasting them over web sockets',
]}
image={[
- // [TODO] Just playing around with some ideas
- <div className="bg-scale-300 relative flex h-[372px] w-[560px] items-center justify-center rounded">
- <p className="p absolute top-4 left-4">Just playing around with some ideas</p>
+ <div className="bg-scale-300 border-scale-500 relative flex h-[372px] w-[560px] items-center justify-center overflow-hidden rounded border">
<div
className={[
- 'bg-brand-900 border-brand-800 relative h-12 w-48 rounded-full border-[3px]',
- `${RealtimeStyles['element']}`,
+ 'border-brand-800 relative h-12 w-48 bg-[#34B27B]',
+ `flex items-center justify-center ${RealtimeStyles['shape']}`,
].join(' ')}
- />
+ >
+ <p
+ className={`text-scale-1200 text-[18px] font-medium ${RealtimeStyles['button-text']}`}
+ >
+ Start a project
+ </p>
+ </div>
<Cursor
color="#236574"
- className={`${RealtimeStyles['cursor-1']} absolute top-[210px] right-[130px]`}
+ className={`${RealtimeStyles['cursor-one']} absolute top-[220px] right-[130px]`}
/>
<Cursor
color="#170B6B"
- className={`${RealtimeStyles['cursor-2']} absolute top-[300px] right-[400px]`}
+ className={`${RealtimeStyles['cursor-two']} absolute top-[180px] right-[280px]`}
/>
<div
className={[
- 'border-scale-1200 absolute bottom-[45px] left-[215px] flex h-10 w-32',
+ 'border-scale-1200 absolute bottom-[40px] left-[175px] flex h-10 w-20',
'items-center justify-center space-x-2 rounded-full border-[3px] bg-[#170B6B]',
- `${RealtimeStyles['comment-bubble']}`,
+ `${RealtimeStyles['cursor-two-comment']}`,
+ ].join(' ')}
+ >
+ <p className="text-lg">🤔</p>
+ </div>
+ <Cursor
+ color="#FFCC00"
+ className={`${RealtimeStyles['cursor-three']} absolute top-[170px] right-[180px]`}
+ />
+ <div
+ className={[
+ 'border-scale-1200 absolute top-[72px] left-[320px] flex h-10 w-20',
+ 'items-center justify-center space-x-2 rounded-full border-[3px] bg-[#FFCC00]',
+ `${RealtimeStyles['cursor-three-comment']}`,
].join(' ')}
>
- <div className="bg-scale-1200 h-2 w-2 rounded-full" />
- <div className="bg-scale-1200 h-2 w-2 rounded-full" />
- <div className="bg-scale-1200 h-2 w-2 rounded-full" />
+ <p className="text-lg">😄</p>
+ </div>
+ <div className="bg-scale-100 border-scale-500 absolute left-0 h-full w-24 border-r py-9 shadow">
+ <div className="border-scale-500 h-7 border-b" />
+ </div>
+ <div className="bg-scale-100 border-scale-500 absolute right-0 h-full w-20 border-l py-9 shadow">
+ <div className="border-scale-500 h-7 border-b" />
+ </div>
+ <div className="bg-scale-100 border-scale-500 absolute top-0 flex h-9 w-full items-center justify-between border-b">
+ <div className="flex items-center">
+ <IconMenu className="text-scale-1200 mx-3" strokeWidth={1} size={16} />
+ <IconGrid className="text-scale-1200 mx-3" strokeWidth={1} size={15} />
+ <IconLayers className="text-scale-1200 mx-3" strokeWidth={1} size={15} />
+ </div>
+ <div className="mx-3 flex items-center">
+ <div className="border-scale-1200 bg-scale-1000 relative -right-4 h-5 w-5 rounded-full border" />
+ <div className="border-scale-1200 bg-scale-1000 relative -right-2 z-[2] h-5 w-5 rounded-full border" />
+ <div className="border-scale-1200 bg-scale-1000 z-[3] h-5 w-5 rounded-full border" />
+ </div>
</div>
+ <p className="p absolute bottom-0 left-4">Just playing around with some ideas</p>
</div>,
- // <div className="header--light block w-full" key="light">
- // <Image
- // src={`${basePath}/images/product/auth/header--light.png`}
- // alt="auth header"
- // layout="responsive"
- // width="1372"
- // height="1074"
- // />
- // </div>,
- // <div className="header--dark mr-0 w-full dark:block" key="dark">
- // <Image
- // src={`${basePath}/images/product/auth/header--dark.png`}
- // alt="auth header"
- // layout="responsive"
- // width="1372"
- // height="1074"
- // />
- // </div>,
]}
// [TODO] Point to the correct docs URL
documentation_url={'/docs/guides/auth'}
/>
- {/* <CodeBlock lang="js">
- {`
- function hello() {
-
- return (
-<div className="flex flex-col items-center justify-center">
- <div className="bg-scale-300 relative flex h-[372px] w-[560px] items-center justify-center rounded">
- <div className="bg-brand-900 border-brand-800 relative h-12 w-48 rounded-full border-[3px]">
- </div>
- </div>
-</div>
- )
-}
- `}
- </CodeBlock> */}
-
<SectionContainer>
<div className="grid grid-cols-12">
<div className="prose col-span-12 mb-10 lg:col-span-3 lg:mb-0">