Skip to content

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

chore: add place holder cards + copy

bautistaaaca5ca4cb2c4b
diff --git a/src/components/landing/feature-card.tsx b/src/components/landing/feature-card.tsx
index d4669e9b..726bcd19 100644
--- a/src/components/landing/feature-card.tsx
+++ b/src/components/landing/feature-card.tsx
@@ -1,9 +1,5 @@
'use client';
-import Image from 'next/image';
-import { type StaticImageData } from 'next/image';
-import { useTheme } from 'next-themes';
-import { useEffect, type CSSProperties, type MouseEvent, useState } from 'react';
import {
motion,
useMotionTemplate,
@@ -11,6 +7,9 @@ import {
type MotionStyle,
type MotionValue,
} from 'framer-motion';
+import { useTheme } from 'next-themes';
+import Image, { type StaticImageData } from 'next/image';
+import { useEffect, useState, type MouseEvent } from 'react';
type WrapperStyle = MotionStyle & {
'--x': MotionValue<string>;
diff --git a/src/components/landing/features.tsx b/src/components/landing/features.tsx
index 7d36f7a9..daf7cfb4 100644
--- a/src/components/landing/features.tsx
+++ b/src/components/landing/features.tsx
@@ -36,8 +36,8 @@ const Features = () => {
</div>
<div className="relative z-10 grid w-full gap-8 lg:grid-cols-2">
<FeatureCard
- title="Learn & Excel"
- description="Create new challenges with a built-in challenge editor and choose accepted solutions"
+ title="Type Challenges"
+ description="Engage in TypeScript challenges to strengthen your grasp of the type system and advanced features"
className="left-[35px] top-[35%] w-[150%] transition-transform duration-300 group-hover:scale-105 sm:left-[35px] sm:top-[30%] sm:w-[110%]"
image={{
dark: FeatureCardChallengeDark,
@@ -47,8 +47,30 @@ const Features = () => {
/>
<FeatureCard
- title="Learn & Excel"
- description="Create new challenges with a built-in challenge editor and choose accepted solutions"
+ title="Collaborative Environment"
+ description="Developers can share solutions and engage in discussions through commenting"
+ className="left-[35px] top-[35%] w-[150%] transition-transform duration-300 group-hover:scale-105 sm:left-[35px] sm:top-[30%] sm:w-[110%]"
+ image={{
+ dark: FeatureCardChallengeDark,
+ light: FeatureCardChallengeLight,
+ alt: 'Something',
+ }}
+ />
+
+ <FeatureCard
+ title="Challenge Creation"
+ description="Craft your own coding challenges to share with the Typehero community"
+ className="left-[35px] top-[35%] w-[150%] transition-transform duration-300 group-hover:scale-105 sm:left-[35px] sm:top-[30%] sm:w-[110%]"
+ image={{
+ dark: FeatureCardChallengeDark,
+ light: FeatureCardChallengeLight,
+ alt: 'Something',
+ }}
+ />
+
+ <FeatureCard
+ title="Track Your Progress"
+ description="Keep tabs on your coding journey with the ability to track your progress on your user profile"
className="left-[35px] top-[35%] w-[150%] transition-transform duration-300 group-hover:scale-105 sm:left-[35px] sm:top-[30%] sm:w-[110%]"
image={{
dark: FeatureCardChallengeDark,
diff --git a/src/components/landing/fake-challenge-card.tsx b/src/components/landing/hero-challenge-card.tsx
similarity index 93%
rename from src/components/landing/fake-challenge-card.tsx
rename to src/components/landing/hero-challenge-card.tsx
index 4a8b7790..d090be16 100644
--- a/src/components/landing/fake-challenge-card.tsx
+++ b/src/components/landing/hero-challenge-card.tsx
@@ -1,5 +1,7 @@
+import type { Difficulty } from '@prisma/client';
import { clsx } from 'clsx';
import { motion, type SVGMotionProps } from 'framer-motion';
+import type { ReactNode } from 'react';
function getRandomWidth() {
const min = 100;
@@ -14,7 +16,8 @@ function getRandomWidth() {
export type FakeChallengeCardProps = {
title: string;
className?: string;
- difficulty?: 'EASY' | 'MEDIUM' | 'HARD';
+ difficulty: Difficulty;
+ prompt: ReactNode;
};
const COLORS_BY_DIFFICULTY = {
@@ -33,7 +36,12 @@ const codeLineProps = {
transition: { duration: 0.5, delay: 0.15 },
} as SVGMotionProps<SVGRectElement>;
-export const FakeChallengeCard = ({ title, className, difficulty }: FakeChallengeCardProps) => {
+export const HeroChallengeCard = ({
+ prompt,
+ title,
+ className,
+ difficulty,
+}: FakeChallengeCardProps) => {
return (
<div
className={clsx(className, {
@@ -54,9 +62,7 @@ export const FakeChallengeCard = ({ title, className, difficulty }: FakeChalleng
@you
</div>
</div>
- <div className="translate-x-1 text-xs">
- Implement the built-in <code>Pick</code> type.
- </div>
+ <div className="translate-x-1 text-xs">{prompt}</div>
<div className="mt-4 h-56 flex-grow rounded-xl bg-zinc-300/70 p-4 duration-300 group-hover/card:-translate-x-1 group-hover/card:-translate-y-3 group-hover/card:shadow-[1rem_1rem_2.5rem_-1rem_#0008] dark:bg-zinc-800/70">
<svg
width="256"
diff --git a/src/components/landing/hero.tsx b/src/components/landing/hero.tsx
index 8f4d716c..941c30ee 100644
--- a/src/components/landing/hero.tsx
+++ b/src/components/landing/hero.tsx
@@ -1,11 +1,11 @@
'use client';
-import { Balancer } from 'react-wrap-balancer';
-import { Github, Mail } from 'lucide-react';
import { motion } from 'framer-motion';
-import { Button } from '~/components/ui/button';
-import { FakeChallengeCard } from '~/components/landing/fake-challenge-card';
+import { Github, Mail } from 'lucide-react';
import Link from 'next/link';
+import { Balancer } from 'react-wrap-balancer';
+import { HeroChallengeCard } from '~/components/landing/hero-challenge-card';
+import { Button } from '~/components/ui/button';
const TypeHeroLogo = () => {
return (
@@ -51,7 +51,7 @@ const Hero = () => (
<p className="max-w-[55ch] bg-transparent px-8 text-center font-medium leading-8 text-black/50 dark:text-white/50 lg:px-0 lg:text-left">
<Balancer>
Connect, collaborate, and grow with a community of TypeScript developers. Elevate your
- skills trough interactive coding challenges, discussions, and knowledge sharing
+ skills through interactive coding challenges, discussions, and knowledge sharing
</Balancer>
</p>
<div className="flex gap-3">
@@ -123,10 +123,11 @@ const Hero = () => (
}}
className="group"
>
- <FakeChallengeCard
- difficulty="EASY"
+ <HeroChallengeCard
+ difficulty="BEGINNER"
className="absolute"
- title="Implement a generic type"
+ title="Implement union type of number and string"
+ prompt="Implement a union type of number and string"
/>
</motion.div>
<motion.div
@@ -145,7 +146,12 @@ const Hero = () => (
}}
className="group"
>
- <FakeChallengeCard className="absolute" title="Implement a JSON parser type" />
+ <HeroChallengeCard
+ difficulty="HARD"
+ className="absolute"
+ title="String to Number"
+ prompt="Convert a string literal to a number"
+ />
</motion.div>
</div>
</div>