Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

feature card stuff (#406)

PickleNikb466a1dd0f45
diff --git a/apps/web/public/Red.webp b/apps/web/public/Red.webp
new file mode 100644
index 00000000..f6ad5f53
Binary files /dev/null and b/apps/web/public/Red.webp differ
diff --git a/apps/web/src/assets/images/feature_card_challenge_dark1.png b/apps/web/src/assets/images/feature_card_challenge_dark1.png
index a884549f..877e6e89 100644
Binary files a/apps/web/src/assets/images/feature_card_challenge_dark1.png and b/apps/web/src/assets/images/feature_card_challenge_dark1.png differ
diff --git a/apps/web/src/assets/images/feature_card_challenge_light1.png b/apps/web/src/assets/images/feature_card_challenge_light1.png
index 6ec9c06c..ced04361 100644
Binary files a/apps/web/src/assets/images/feature_card_challenge_light1.png and b/apps/web/src/assets/images/feature_card_challenge_light1.png differ
diff --git a/apps/web/src/assets/images/feature_card_challenge_light2.png b/apps/web/src/assets/images/feature_card_challenge_light2.png
index f2ac061c..b3df73f7 100644
Binary files a/apps/web/src/assets/images/feature_card_challenge_light2.png and b/apps/web/src/assets/images/feature_card_challenge_light2.png differ
diff --git a/apps/web/src/assets/images/step1dark1.png b/apps/web/src/assets/images/step1dark1.png
new file mode 100644
index 00000000..88988433
Binary files /dev/null and b/apps/web/src/assets/images/step1dark1.png differ
diff --git a/apps/web/src/assets/images/step1dark2.png b/apps/web/src/assets/images/step1dark2.png
new file mode 100644
index 00000000..bb79cbf4
Binary files /dev/null and b/apps/web/src/assets/images/step1dark2.png differ
diff --git a/apps/web/src/assets/images/step1light1.png b/apps/web/src/assets/images/step1light1.png
new file mode 100644
index 00000000..167b1f73
Binary files /dev/null and b/apps/web/src/assets/images/step1light1.png differ
diff --git a/apps/web/src/assets/images/step1light2.png b/apps/web/src/assets/images/step1light2.png
new file mode 100644
index 00000000..3f04d7dd
Binary files /dev/null and b/apps/web/src/assets/images/step1light2.png differ
diff --git a/apps/web/src/assets/images/feature_card_create_dark1.png b/apps/web/src/assets/images/step2dark1.png
similarity index 100%
rename from apps/web/src/assets/images/feature_card_create_dark1.png
rename to apps/web/src/assets/images/step2dark1.png
diff --git a/apps/web/src/assets/images/feature_card_create_dark2.png b/apps/web/src/assets/images/step2dark2.png
similarity index 100%
rename from apps/web/src/assets/images/feature_card_create_dark2.png
rename to apps/web/src/assets/images/step2dark2.png
diff --git a/apps/web/src/assets/images/feature_card_create_light1.png b/apps/web/src/assets/images/step2light1.png
similarity index 100%
rename from apps/web/src/assets/images/feature_card_create_light1.png
rename to apps/web/src/assets/images/step2light1.png
diff --git a/apps/web/src/assets/images/feature_card_create_light2.png b/apps/web/src/assets/images/step2light2.png
similarity index 100%
rename from apps/web/src/assets/images/feature_card_create_light2.png
rename to apps/web/src/assets/images/step2light2.png
diff --git a/apps/web/src/assets/images/step3dark.png b/apps/web/src/assets/images/step3dark.png
new file mode 100644
index 00000000..86d1cbae
Binary files /dev/null and b/apps/web/src/assets/images/step3dark.png differ
diff --git a/apps/web/src/assets/images/step3light.png b/apps/web/src/assets/images/step3light.png
new file mode 100644
index 00000000..fae01e03
Binary files /dev/null and b/apps/web/src/assets/images/step3light.png differ
diff --git a/apps/web/src/components/landing/community/community.tsx b/apps/web/src/components/landing/community/community.tsx
index d8639143..b038a8db 100644
--- a/apps/web/src/components/landing/community/community.tsx
+++ b/apps/web/src/components/landing/community/community.tsx
@@ -18,11 +18,11 @@ function Community() {
return (
<>
- <div className="containerthing -z-10 flex rotate-180 opacity-50 dark:opacity-100">
+ <div className="lampcontainer -z-10 flex rotate-180 opacity-50 dark:opacity-100">
<div
className={clsx(
- { 'scale-[3] md:scale-[2] 2xl:scale-[1.75]': inView },
- 'thething translate-z-0 translate-y-[-180px] rotate-180 scale-50 animate-none duration-1000',
+ { 'scale-[3] md:scale-[2] 2xl:scale-[1.55]': inView },
+ 'lamp translate-z-0 translate-y-[-180px] rotate-180 scale-50 animate-none duration-1000',
)}
ref={ref}
style={
@@ -53,42 +53,42 @@ function Community() {
of the contributors who made this possible so far.
</p>
<div className="flex flex-col gap-3 sm:flex-row">
- <button className="group mx-auto flex rounded-xl bg-neutral-200 text-sm font-bold duration-300 hover:bg-[#5865F2] hover:text-white dark:bg-neutral-800 dark:hover:bg-[#5865F2]">
- <a
- className="inline-flex items-center gap-2 px-3 py-2"
- href="https://discord.gg/trashdev"
+ <a
+ target="_blank"
+ rel="noreferrer"
+ href="https://discord.gg/trashdev"
+ className="group mx-auto flex items-center gap-2 rounded-xl bg-neutral-200 px-3 py-2 text-sm font-bold duration-300 hover:bg-[#5865F2] hover:text-white dark:bg-neutral-800 dark:hover:bg-[#5865F2]"
+ >
+ <svg
+ className="h-4 w-4 fill-current group-hover:rotate-[360deg]"
+ role="img"
+ style={{ transition: 'color 0s, transform 0.3s' }}
+ viewBox="0 0 24 24"
+ xmlns="http://www.w3.org/2000/svg"
>
- <svg
- className="h-4 w-4 fill-current group-hover:rotate-[360deg]"
- role="img"
- style={{ transition: 'color 0s, transform 0.3s' }}
- viewBox="0 0 24 24"
- xmlns="http://www.w3.org/2000/svg"
- >
- <title>Discord</title>
- <path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z" />
- </svg>
- Join the Discord
- </a>
- </button>
- <button className="group flex gap-2 rounded-xl bg-neutral-200 text-sm font-bold duration-300 hover:bg-black hover:text-white dark:bg-neutral-800 dark:hover:bg-white dark:hover:text-black">
- <a
- className="inline-flex items-center gap-2 px-3 py-2"
- href="https://github.com/bautistaaa/typehero/blob/main/CONTRIBUTING.md"
+ <title>Discord</title>
+ <path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z" />
+ </svg>
+ Join the Discord
+ </a>
+ <a
+ target="_blank"
+ rel="noreferrer"
+ href="https://github.com/bautistaaa/typehero/blob/main/CONTRIBUTING.md"
+ className="group flex items-center gap-2 rounded-xl bg-neutral-200 px-3 py-2 text-sm font-bold duration-300 hover:bg-black hover:text-white dark:bg-neutral-800 dark:hover:bg-white dark:hover:text-black"
+ >
+ <svg
+ className="h-4 w-4 fill-current group-hover:-rotate-[360deg]"
+ role="img"
+ style={{ transition: 'color 0s, transform 0.3s' }}
+ viewBox="0 0 24 24"
+ xmlns="http://www.w3.org/2000/svg"
>
- <svg
- className="h-4 w-4 fill-current group-hover:-rotate-[360deg]"
- role="img"
- style={{ transition: 'color 0s, transform 0.3s' }}
- viewBox="0 0 24 24"
- xmlns="http://www.w3.org/2000/svg"
- >
- <title>GitHub</title>
- <path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" />
- </svg>
- Contribute on GitHub
- </a>
- </button>
+ <title>GitHub</title>
+ <path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" />
+ </svg>
+ Contribute on GitHub
+ </a>
</div>
</div>
<div className="relative flex-1 pb-36 pl-4 lg:pb-0">
diff --git a/apps/web/src/components/landing/feature-card.tsx b/apps/web/src/components/landing/feature-card.tsx
index d3b00ed4..709cf901 100644
--- a/apps/web/src/components/landing/feature-card.tsx
+++ b/apps/web/src/components/landing/feature-card.tsx
@@ -8,14 +8,17 @@ import {
type MotionValue,
} from 'framer-motion';
import { useTheme } from 'next-themes';
-import { DifficultyBadge, UserBadge } from '@repo/ui';
+import { UserBadge } from '@repo/ui';
import Image, { type StaticImageData } from 'next/image';
import Link from 'next/link';
import { useEffect, useState, type MouseEvent } from 'react';
-import { Check, Minus, Triangle, X, Reply } from 'lucide-react';
+import { Check, Reply } from 'lucide-react';
import clsx from 'clsx';
+import { z } from 'zod';
import type { Difficulty } from '@repo/db/types';
+import { useInView } from 'react-intersection-observer';
import { Markdown } from '../ui/markdown';
+import { Steps } from '../wizard/Steps';
import { useIsMobile } from '~/utils/useIsMobile';
type WrapperStyle = MotionStyle & {
@@ -115,6 +118,7 @@ export function ImageCard({
maxWidth: 'unset',
}}
/>
+
<Image
alt={image.alt}
className={imgClass2}
@@ -156,6 +160,209 @@ export function ImageCard({
);
}
+export function ChallengeCreationCard({
+ image,
+ step1img1Class,
+ step1img2Class,
+ step2img1Class,
+ step2img2Class,
+ step3imgClass,
+ ...props
+}: CardProps & {
+ step1img1Class?: string;
+ step1img2Class?: string;
+ step2img1Class?: string;
+ step2img2Class?: string;
+ step3imgClass?: string;
+ image: {
+ step1dark1: StaticImageData;
+ step1dark2: StaticImageData;
+ step1light1: StaticImageData;
+ step1light2: StaticImageData;
+ step2dark1: StaticImageData;
+ step2dark2: StaticImageData;
+ step2light1: StaticImageData;
+ step2light2: StaticImageData;
+ step3dark: StaticImageData;
+ step3light: StaticImageData;
+ alt: string;
+ };
+}) {
+ const { resolvedTheme } = useTheme();
+ const [step, setStep] = useState(0);
+ const steps = [
+ { id: '1', name: 'πŸ†', schema: z.any() },
+ { id: '2', name: 'πŸ‘', schema: z.any() },
+ { id: '3', name: '🍌', schema: z.any() },
+ { id: '4', name: 'πŸ’¦', schema: z.any() },
+ ];
+ return (
+ <FeatureCard {...props}>
+ <div className="absolute -right-4 bottom-4 w-full md:relative md:-right-16 md:bottom-0 md:-mr-36 md:-mt-24">
+ <Steps current={step} onChange={(idx) => setStep(idx)} steps={steps} />
+ </div>
+
+ <div
+ className={clsx(
+ { 'translate-x-0 opacity-0': step < 3 },
+ 'absolute left-1/2 top-1/2 flex w-[80%] -translate-x-1/2 -translate-y-[33%] flex-col gap-12 text-center text-2xl font-bold transition-all duration-500 md:w-[50%]',
+ )}
+ >
+ <div>πŸŽ‰</div>
+ <div className="opacity-80">Thanks for creating a challenge!</div>
+ </div>
+ {resolvedTheme === 'light' && (
+ <>
+ {/* step 1 */}
+ <Image
+ alt={image.alt}
+ className={clsx(step1img1Class, { '-translate-x-36 opacity-0': step > 0 })}
+ src={image.step1light1}
+ style={{
+ position: 'absolute',
+ userSelect: 'none',
+ maxWidth: 'unset',
+ }}
+ />
+ <Image
+ alt={image.alt}
+ className={clsx(step1img2Class, { '-translate-x-24 opacity-0': step > 0 })}
+ src={image.step1light2}
+ style={{
+ position: 'absolute',
+ userSelect: 'none',
+ maxWidth: 'unset',
+ }}
+ />
+
+ {/* step 2 */}
+ <Image
+ alt={image.alt}
+ className={clsx(
+ step2img1Class,
+ { 'translate-x-36 opacity-0': step < 1 },
+ { '-translate-x-36 opacity-0': step > 1 },
+ )}
+ src={image.step2light1}
+ style={{
+ position: 'absolute',
+ userSelect: 'none',
+ maxWidth: 'unset',
+ }}
+ />
+ <Image
+ alt={image.alt}
+ className={clsx(
+ step2img2Class,
+ { 'translate-x-24 opacity-0': step < 1 },
+ { '-translate-x-24 opacity-0': step > 1 },
+ )}
+ src={image.step2light2}
+ style={{
+ position: 'absolute',
+ userSelect: 'none',
+ maxWidth: 'unset',
+ }}
+ />
+ {/* step 3 */}
+ <Image
+ alt={image.alt}
+ className={clsx(
+ step3imgClass,
+ { 'translate-x-36 opacity-0': step < 2 },
+ { '-translate-x-36 opacity-0': step > 2 },
+ { 'opacity-90': step === 2 },
+ )}
+ src={image.step3light}
+ style={{
+ position: 'absolute',
+ userSelect: 'none',
+ maxWidth: 'unset',
+ }}
+ />
+ </>
+ )}
+ {resolvedTheme === 'dark' && (
+ <>
+ {/* step 1 */}
+ <Image
+ alt={image.alt}
+ className={clsx(step1img1Class, { '-translate-x-36 opacity-0': step > 0 })}
+ src={image.step1dark1}
+ style={{
+ position: 'absolute',
+ userSelect: 'none',
+ maxWidth: 'unset',
+ }}
+ />
+ <Image
+ alt={image.alt}
+ className={clsx(step1img2Class, { '-translate-x-24 opacity-0': step > 0 })}
+ src={image.step1dark2}
+ style={{
+ position: 'absolute',
+ userSelect: 'none',
+ maxWidth: 'unset',
+ }}
+ />
+
+ {/* step 2 */}
+ <Image
+ alt={image.alt}
+ className={clsx(
+ step2img1Class,
+ { 'translate-x-36 opacity-0': step < 1 },
+ { '-translate-x-36 opacity-0': step > 1 },
+ )}
+ src={image.step2dark1}
+ style={{
+ position: 'absolute',
+ userSelect: 'none',
+ maxWidth: 'unset',
+ }}
+ />
+ <Image
+ alt={image.alt}
+ className={clsx(
+ step2img2Class,
+ { 'translate-x-24 opacity-0': step < 1 },
+ { '-translate-x-24 opacity-0': step > 1 },
+ )}
+ src={image.step2dark2}
+ style={{
+ position: 'absolute',
+ userSelect: 'none',
+ maxWidth: 'unset',
+ }}
+ />
+
+ {/* step 3 */}
+ <Image
+ alt={image.alt}
+ className={clsx(
+ step3imgClass,
+ { 'translate-x-36 opacity-0': step < 2 },
+ { '-translate-x-36 opacity-0': step > 2 },
+ { 'opacity-90': step === 2 },
+ )}
+ src={image.step3dark}
+ style={{
+ position: 'absolute',
+ userSelect: 'none',
+ maxWidth: 'unset',
+ }}
+ />
+ </>
+ )}
+ {/* whole card is a "Next button" */}
+ <div
+ className="absolute left-0 top-0 z-50 h-full w-full cursor-pointer"
+ onClick={() => (step >= 3 ? setStep(0) : setStep((step) => step + 1))}
+ />
+ </FeatureCard>
+ );
+}
+
const solutionComment = `\`\`\`ts
// CODE START
type Get<T, K> = string
@@ -163,12 +370,20 @@ type Get<T, K> = string
export function CollaborativeEnvironmentCard(props: CardProps) {
const isMobile = useIsMobile();
+ const { ref, inView } = useInView({
+ triggerOnce: true,
+ });
+
return (
<FeatureCard {...props}>
- <div className="absolute inset-0 top-[35%] flex w-[100%] flex-col gap-3 pt-4 max-md:scale-90 md:left-[37px] md:top-[30%]">
+ <div
+ ref={ref}
+ className="absolute inset-0 left-[23px] top-[35%] flex w-[100%] flex-col gap-3 pt-4 max-md:scale-90 md:left-[37px] md:top-[30%]"
+ >
<div
className={clsx(
- 'rounded-3xl bg-neutral-500/10 p-4 pt-3 duration-150',
+ { comment1: inView },
+ 'rounded-l-3xl bg-neutral-500/10 p-4 pt-3 opacity-0 duration-150',
!isMobile && 'hover:bg-neutral-500/20',
)}
>
@@ -180,7 +395,8 @@ export function CollaborativeEnvironmentCard(props: CardProps) {
</div>
<div
className={clsx(
- 'relative ml-12 rounded-3xl bg-neutral-500/10 p-4 pt-3 duration-150',
+ { comment2: inView },
+ 'relative ml-12 rounded-l-3xl bg-neutral-500/10 p-4 pt-3 opacity-0 duration-150',
!isMobile && 'hover:bg-neutral-500/20',
)}
>
@@ -194,7 +410,8 @@ export function CollaborativeEnvironmentCard(props: CardProps) {
</div>
<div
className={clsx(
- 'relative ml-12 rounded-tl-3xl bg-neutral-500/10 p-4 pt-3 duration-150',
+ { comment3: inView },
+ 'relative ml-12 rounded-tl-3xl bg-neutral-500/10 p-4 pt-3 opacity-0 duration-150',
!isMobile && 'hover:bg-neutral-500/20',
)}
>
@@ -203,24 +420,13 @@ export function CollaborativeEnvironmentCard(props: CardProps) {
<UserBadge username="69" linkComponent={Link} />
<div className="text-xs text-neutral-500">just now</div>
</div>
- <svg
- xmlns="http://www.w3.org/2000/svg"
- version="1.1"
- x="0px"
- y="0px"
- width="150px"
- height="198px"
- viewBox="0 0 150 198"
- enableBackground="new 0 0 150 198"
- >
- <image
- width="150"
- height="198"
- x="0"
- y="0"
- href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAADGCAMAAAAHUYknAAAABGdBTUEAALGPC/xhBQAAACBjSFJN AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAA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UMTU6NDM6MDIrMDA6MDDPGSsXAAAAAElFTkSuQmCC"
- />
- </svg>
+ <Image
+ className={clsx({ amoguwusus: inView }, 'opacity-0')}
+ alt="amoguwuawa"
+ src="/Red.webp"
+ height="198"
+ width="150"
+ />
</div>
</div>
</FeatureCard>
@@ -232,17 +438,14 @@ export function CuratedTracksCard(props: CardProps) {
<FeatureCard {...props}>
<div
className={clsx(
- 'absolute inset-0 top-[90%] flex flex-col items-center justify-center gap-1',
- 'max-md:scale-125 md:top-[38%]',
+ 'absolute inset-0 top-[50%] flex flex-col items-center justify-center',
+ 'max-md:scale-110 md:top-[38%]',
)}
>
- <div className="flex w-[69%] items-center justify-between gap-3 rounded-b-lg rounded-t-2xl bg-neutral-500/10 p-2 pl-3">
- <span className="text-sm font-medium">Track name</span>
- <div className="flex items-center gap-3">
- <Minus className="h-3 w-3" />
- <Triangle className="h-3 w-3" />
- <X className="h-3 w-3" />
- </div>
+ <div className="flex w-[69%] items-center justify-between gap-3 rounded-b-lg rounded-t-xl bg-neutral-500/10 p-2 pl-3">
+ <span className="flex items-center gap-1 text-xs font-semibold tracking-wide">
+ Array / String
+ </span>
</div>
{tracks.map((track) => (
@@ -260,62 +463,81 @@ interface Track {
label: string;
}
+const COLORS_BY_DIFFICULTY = {
+ BEGINNER: 'text-pink-600 dark:text-pink-300',
+ EASY: 'text-emerald-600 dark:text-emerald-300',
+ MEDIUM: 'text-yellow-600 dark:text-yellow-300',
+ HARD: 'text-red-600 dark:text-red-300',
+ EXTREME: 'text-orange-600 dark:text-orange-300',
+};
+
+const BGS_BY_DIFFICULTY = {
+ BEGINNER: 'bg-pink-600 dark:bg-pink-300',
+ EASY: 'bg-emerald-600 dark:bg-emerald-300',
+ MEDIUM: 'bg-yellow-600 dark:bg-yellow-300',
+ HARD: 'bg-red-600 dark:bg-red-300',
+ EXTREME: 'bg-orange-600 dark:bg-orange-300',
+};
+
const tracks: Track[] = [
- {
- id: '1',
- label: 'Awaited',
- difficulty: 'BEGINNER',
- className: 'peer-checked/1:bg-pink-300/50 peer-checked/1:hover:bg-pink-300/50',
- },
{
id: '2',
label: 'Unshift',
difficulty: 'EASY',
- className: 'peer-checked/2:bg-emerald-300/50 peer-checked/2:hover:bg-emerald-300/50',
},
{
id: '3',
label: 'Append Argument',
difficulty: 'MEDIUM',
- className: 'peer-checked/3:bg-yellow-300/50 peer-checked/3:hover:bg-yellow-300/50',
+ },
+ {
+ id: '5',
+ label: 'Get Readonly Keys',
+ difficulty: 'EXTREME',
},
{
id: '4',
label: 'CamelCase',
difficulty: 'HARD',
- className: 'peer-checked/4:bg-red-300/50 peer-checked/4:hover:bg-red-300/50',
},
{
- id: '5',
- label: 'Get Readonly Keys',
- difficulty: 'EXTREME',
- className: 'peer-checked/5:bg-orange-300/50 peer-checked/5:hover:bg-orange-300/50',
+ id: '1',
+ label: 'Awaited',
+ difficulty: 'BEGINNER',
},
];
function Track({ className, difficulty, id, label }: Track) {
const isMobile = useIsMobile();
return (
- <>
- <input className={`peer/${id} appearance-none`} type="checkbox" id={id} />
- <label
- htmlFor={id}
+ <label
+ htmlFor={id}
+ className="group/challenge flex w-[69%] cursor-pointer flex-col items-center pt-2"
+ >
+ <div
className={clsx(
- 'flex w-[69%] cursor-pointer items-center justify-between gap-3 rounded-lg bg-neutral-500/10 p-4 text-zinc-700 duration-300 active:scale-100 active:duration-75 dark:text-zinc-300',
+ 'flex w-full cursor-pointer items-center justify-between gap-3 overflow-hidden rounded-lg bg-neutral-500/10 p-4 py-2 text-black/90 duration-300 group-active/challenge:bg-neutral-500/40 group-active/challenge:duration-75 dark:text-white/90 sm:py-4',
className,
- !isMobile && 'hover:scale-105 hover:rounded-xl group-hover:hover:bg-neutral-500/20',
+ !isMobile &&
+ 'group-hover/challenge:scale-105 group-hover/challenge:rounded-xl group-hover/challenge:bg-neutral-500/20',
)}
>
- <div className="flex items-center gap-3">
- <div className="h-4 w-4 rounded-lg">
- <Check className="h-3 w-3" />
- </div>
+ <div className="relative flex items-center gap-3 text-xs sm:text-base">
+ <input className="peer hidden appearance-none" type="checkbox" id={id} />
+ <div className="h-5 w-5 rounded-full border border-black/70 bg-black/10 duration-75 peer-checked:border-transparent peer-checked:bg-green-600/80 dark:border-white/50 dark:bg-white/10 peer-checked:dark:bg-green-300/80" />
+ <Check className="absolute left-1 my-auto h-3 w-3 scale-0 stroke-[4] text-white duration-300 peer-checked:scale-100 dark:text-black" />
{label}
</div>
- <div className="group">
- <DifficultyBadge difficulty={difficulty} />
+ <div
+ className={`relative text-xs font-medium tracking-wide ${COLORS_BY_DIFFICULTY[difficulty]}`}
+ >
+ <div
+ className={`absolute right-0 top-1/2 h-12 w-12 -translate-y-1/2 blur-3xl ${BGS_BY_DIFFICULTY[difficulty]}`}
+ />
+ {difficulty[0]}
+ {difficulty.substring(1, difficulty.length).toLowerCase()}
</div>
- </label>
- </>
+ </div>
+ </label>
);
}
diff --git a/apps/web/src/components/landing/features.tsx b/apps/web/src/components/landing/features.tsx
index b331e7bf..6b304c6a 100644
--- a/apps/web/src/components/landing/features.tsx
+++ b/apps/web/src/components/landing/features.tsx
@@ -5,16 +5,23 @@ import clsx from 'clsx';
import {
ImageCard,
CollaborativeEnvironmentCard,
+ ChallengeCreationCard,
CuratedTracksCard,
} from '~/components/landing/feature-card';
import FeatureCardChallengeDark1 from '~/assets/images/feature_card_challenge_dark1.png';
import FeatureCardChallengeDark2 from '~/assets/images/feature_card_challenge_dark2.png';
import FeatureCardChallengeLight1 from '~/assets/images/feature_card_challenge_light1.png';
import FeatureCardChallengeLight2 from '~/assets/images/feature_card_challenge_light2.png';
-import FeatureCardCreateLight1 from '~/assets/images/feature_card_create_light1.png';
-import FeatureCardCreateLight2 from '~/assets/images/feature_card_create_light2.png';
-import FeatureCardCreateDark1 from '~/assets/images/feature_card_create_dark1.png';
-import FeatureCardCreateDark2 from '~/assets/images/feature_card_create_dark2.png';
+import Step1Dark1 from '~/assets/images/step1dark1.png';
+import Step1Dark2 from '~/assets/images/step1dark2.png';
+import Step1Light1 from '~/assets/images/step1light1.png';
+import Step1Light2 from '~/assets/images/step1light2.png';
+import Step2Light1 from '~/assets/images/step2light1.png';
+import Step2Light2 from '~/assets/images/step2light2.png';
+import Step2Dark1 from '~/assets/images/step2dark1.png';
+import Step2Dark2 from '~/assets/images/step2dark2.png';
+import Step3Light from '~/assets/images/step3light.png';
+import Step3Dark from '~/assets/images/step3dark.png';
import { useIsMobile } from '~/utils/useIsMobile';
function Features() {
@@ -23,7 +30,7 @@ function Features() {
<section className="relative overflow-hidden" id="features">
<div className="container mb-[64px] grid items-center justify-center">
<div className="flex flex-col items-center justify-center gap-16">
- <div className="flex flex-col gap-3 text-center">
+ <div className="flex flex-col gap-3 px-4 text-center sm:px-0">
<a
className="mx-auto hidden rounded-full bg-gradient-to-r from-[#31bdc6] to-[#3178c6] p-[1px] brightness-90 contrast-150 dark:brightness-125 dark:contrast-100 sm:block"
href="#features"
@@ -51,56 +58,73 @@ function Features() {
<div className="relative z-10 grid w-full gap-8 lg:grid-cols-2">
<ImageCard
imgClass1={clsx(
- 'pointer-events-noned transition-transform duration-500 bg-neutral-50/80 dark:bg-neutral-800/80',
- 'max-sm:scale-[240%] bottom-[5%] left-[30%] w-[42%] md:-bottom-[11%] md:left-[35px] lg:w-[69%]',
+ 'pointer-events-none transition-transform duration-500 bg-neutral-50/30 dark:bg-neutral-800/30',
+ 'scale-[150%] sm:scale-[110%] md:scale-100 max-md:rounded-sm rounded-xl top-[69%] left-[69px] md:top-auto w-[42%] md:-bottom-[11%] sm:left-[40px] lg:w-[69%]',
!isMobile && 'group-hover:translate-x-2 group-hover:scale-95',
)}
imgClass2={clsx(
- 'pointer-events-none transition-transform duration-500 rounded-xl overflow-hidden bg-neutral-50/80 dark:bg-neutral-800/80',
- 'max-sm:scale-[280%] left-[80%] -bottom-[1%] w-[50%] md:left-[39%] md:-bottom-[12%] lg:w-[77%]',
+ 'pointer-events-none transition-transform duration-500 bg-neutral-50/50 dark:bg-zinc-800/60 backdrop-blur-sm translate-x-0',
+ 'scale-[190%] sm:scale-[150%] md:scale-100 rounded-2xl max-md:rounded-md left-[50%] top-[69%] md:top-auto w-[50%] sm:left-[39%] md:-bottom-[12%] lg:w-[77%]',
!isMobile && 'group-hover:scale-105 group-hover:-translate-x-2',
)}
description="Engage in TypeScript challenges to strengthen your grasp of the type system and advanced features"
bgClass="lg:bg-gradient-to-br"
image={{
- dark1: FeatureCardChallengeDark1,
- dark2: FeatureCardChallengeDark2,
- light1: FeatureCardChallengeLight1,
- light2: FeatureCardChallengeLight2,
+ dark1: FeatureCardChallengeDark2,
+ dark2: FeatureCardChallengeDark1,
+ light1: FeatureCardChallengeLight2,
+ light2: FeatureCardChallengeLight1,
alt: 'Something',
}}
title="Type Challenges"
/>
-
<CollaborativeEnvironmentCard
description="Developers can share solutions and engage in discussions through commenting"
bgClass="lg:bg-gradient-to-bl"
title="Collaborative Environment"
/>
-
- <ImageCard
- imgClass1={clsx(
- 'pointer-events-none w-[50%] rounded-t-xl border border-zinc-300 opacity-80 transition-transform duration-500 dark:border-zinc-700 bg-neutral-50/80 dark:bg-neutral-800/80',
- 'max-md:scale-[160%] left-[15%] top-[57%] md:left-[35px] md:top-[30%]',
+ <ChallengeCreationCard
+ step1img1Class={clsx(
+ 'pointer-events-none w-[50%] border border-zinc-300/50 transition-all duration-500 dark:border-zinc-700/50',
+ 'max-md:scale-[160%] max-md:rounded-xl rounded-2xl left-[25%] top-[57%] md:left-[35px] md:top-[41%]',
!isMobile && 'group-hover:translate-y-2',
)}
- imgClass2={clsx(
- 'pointer-events-none w-[150%] rounded-t-xl border border-zinc-300 dark:border-zinc-700 ransition-transform duration-500 opacity-80 rounded-xl overflow-hidden bg-neutral-50/80 dark:bg-neutral-800/80',
+ step1img2Class={clsx(
+ 'pointer-events-none w-[60%] border border-zinc-300/50 dark:border-zinc-700/50 transition-all duration-500 overflow-hidden',
+ 'max-md:scale-[160%] rounded-xl max-md:rounded-lg left-[69%] top-[53%] md:top-[41%] md:left-[calc(50%+35px+1rem)]',
+ !isMobile && 'group-hover:-translate-y-6',
+ )}
+ step2img1Class={clsx(
+ 'pointer-events-none w-[50%] rounded-t-xl overflow-hidden border border-zinc-300 transition-all duration-500 dark:border-zinc-700',
+ 'max-md:scale-[160%] left-[25%] top-[69%] md:left-[35px] md:top-[30%]',
+ !isMobile && 'group-hover:translate-y-2',
+ )}
+ step2img2Class={clsx(
+ 'pointer-events-none w-[110%] rounded-t-xl border border-zinc-300 dark:border-zinc-700 transition-all duration-500 rounded-xl overflow-hidden group-hover:-translate-y-6',
'max-md:scale-[140%] left-[70%] top-[53%] md:top-[30%] md:left-[calc(50%+35px+1rem)]',
!isMobile && 'group-hover:-translate-y-6',
)}
+ step3imgClass={clsx(
+ 'pointer-events-none w-[90%] border border-zinc-300 dark:border-zinc-700 rounded-t-2xl transition-all duration-500 overflow-hidden',
+ 'left-[5%] top-[50%] md:top-[30%] md:left-1/2 md:left-[35px]',
+ )}
description="Craft your own coding challenges to share with the Typehero community"
bgClass="lg:bg-gradient-to-tr"
image={{
- dark1: FeatureCardCreateDark1,
- dark2: FeatureCardCreateDark2,
- light1: FeatureCardCreateLight1,
- light2: FeatureCardCreateLight2,
+ step1dark1: Step1Dark1,
+ step1dark2: Step1Dark2,
+ step1light1: Step1Light1,
+ step1light2: Step1Light2,
+ step2dark1: Step2Dark1,
+ step2dark2: Step2Dark2,
+ step2light1: Step2Light1,
+ step2light2: Step2Light2,
+ step3dark: Step3Dark,
+ step3light: Step3Light,
alt: 'Something',
}}
title="Challenge Creation"
/>
-
<CuratedTracksCard
description="Tracks features curated TypeScript challenges, spanning various topics and difficulty levels, to advance your TypeScript skills."
bgClass="lg:bg-gradient-to-tl"
diff --git a/apps/web/src/components/landing/hero.tsx b/apps/web/src/components/landing/hero.tsx
index 245123cc..6d70cd7a 100644
--- a/apps/web/src/components/landing/hero.tsx
+++ b/apps/web/src/components/landing/hero.tsx
@@ -91,7 +91,12 @@ function Hero() {
className="flex items-center gap-2 rounded-xl border-2 px-4 py-2 dark:text-white"
variant="outline"
>
- <a className="inline-flex gap-1" href="https://github.com/bautistaaa/typehero">
+ <a
+ target="_blank"
+ rel="noreferrer"
+ className="inline-flex gap-1"
+ href="https://github.com/bautistaaa/typehero"
+ >
<Github className="h-4 w-4" />
GitHub
</a>
diff --git a/apps/web/src/components/wizard/Steps.tsx b/apps/web/src/components/wizard/Steps.tsx
index 85b50268..027f493a 100644
--- a/apps/web/src/components/wizard/Steps.tsx
+++ b/apps/web/src/components/wizard/Steps.tsx
@@ -28,12 +28,11 @@ export function Steps<T extends Step>({ steps, current, onChange }: Props<T>) {
)}
key={step.name}
>
- <a
+ <div
className={clsx(
- 'group flex w-full items-center',
+ 'group flex w-full cursor-pointer items-center',
(isFuture || isCurrent) && 'pointer-events-none',
)}
- href="#"
onClick={() => onChange(stepIdx)}
>
<span className="flex items-center gap-2 text-sm font-medium">
@@ -66,7 +65,7 @@ export function Steps<T extends Step>({ steps, current, onChange }: Props<T>) {
{step.name}
</span>
</span>
- </a>
+ </div>
</li>
);
})}
diff --git a/apps/web/src/styles/globals.css b/apps/web/src/styles/globals.css
index d4720a1c..de334a3b 100644
--- a/apps/web/src/styles/globals.css
+++ b/apps/web/src/styles/globals.css
@@ -263,14 +263,14 @@ main {
}
}
-.containerthing {
+.lampcontainer {
position: relative;
margin-top: -330px;
contain: layout;
height: 420px;
}
-.thething {
+.lamp {
width: 100%;
height: 400px;
position: relative;
@@ -289,9 +289,12 @@ main {
hsl(var(--background)),
hsl(var(--background))
);
- mask-image: radial-gradient(100% 50% at center center, black, transparent);
-webkit-mask-image: radial-gradient(100% 50% at center center, black, transparent);
background-image: var(--first), var(--second);
+ background-attachment: ;
+ background-origin: ;
+ background-clip: ;
+ background-color: ;
background-position-x: 1%, 99%;
background-position-y: 0%, 0%;
background-size: 50% 100%, 50% 100%;
@@ -325,13 +328,12 @@ main {
}
}
-.thething::after {
+.lamp::after {
content: '';
position: absolute;
inset: 0px 0px 50%;
overflow: hidden;
opacity: 0.1;
- mask-image: radial-gradient(140px 50% at 50% 100%, black, transparent);
-webkit-mask-image: radial-gradient(140px 50% at 50% 100%, black, transparent);
}
@@ -339,3 +341,67 @@ main {
display: none; /* Chrome Safari */
scrollbar-width: none; /* Firefox */
}
+
+/* comments feature card animations */
+
+.comment1 {
+ opacity: 0;
+ animation: fadeUp 0.6s ease-in-out 1 forwards;
+}
+
+.comment2 {
+ opacity: 0;
+ animation: fadeUp 0.6s 0.9s ease-in-out 1 forwards;
+}
+
+.comment3 {
+ opacity: 0;
+ animation: fadeUp 0.6s 1.1s ease-in-out 1 forwards;
+}
+
+.amoguwusus {
+ opacity: 0;
+ animation: amog 7.5s 1.6s ease-in-out infinite forwards;
+}
+
+@keyframes amog {
+ 0% {
+ opacity: 1;
+ transform: translateY(69px);
+ }
+ 6% {
+ transform: translateX(0) translateY(16px);
+ }
+ 20% {
+ transform: translateX(0) translateY(16px);
+ }
+ 22% {
+ transform: translateX(0) translateY(0px);
+ }
+ 24% {
+ transform: translateX(0) translateY(16px);
+ }
+ 40% {
+ opacity: 1;
+ transform: translateX(666px) translateY(0px);
+ }
+ 100% {
+ opacity: 1;
+ transform: translateX(666px) translateY(0px);
+ }
+}
+
+@keyframes fadeUp {
+ 0% {
+ opacity: 0;
+ transform: translateY(32px);
+ }
+ 50% {
+ opacity: 1;
+ transform: translateY(-8px);
+ }
+ 100% {
+ opacity: 1;
+ transform: translateY(0px);
+ }
+}