Skip to content

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

add padding for horizontal mobile, remove 3rd feature card on mobile, wrap feature cards on md: (#897)

PickleNika28f4161ea2e
diff --git a/apps/web/src/app/[locale]/_components/feature-card.tsx b/apps/web/src/app/[locale]/_components/feature-card.tsx
index a3228ea5..915cc57f 100644
--- a/apps/web/src/app/[locale]/_components/feature-card.tsx
+++ b/apps/web/src/app/[locale]/_components/feature-card.tsx
@@ -74,7 +74,7 @@ function FeatureCard({
)}
>
<div className="mx-10 my-10 min-h-[450px] w-full">
- <div className="flex w-4/6 flex-col gap-3">
+ <div className="flex w-4/6 flex-col gap-3 md:w-[80%] xl:w-4/6">
<h2 className="text-xl font-bold tracking-tight md:text-xl">{title}</h2>
<p className="text-sm leading-5 text-zinc-600 dark:text-zinc-400 sm:text-base sm:leading-7">
{description}
@@ -455,12 +455,12 @@ export function CuratedTracksCard(props: CardProps) {
'max-md:scale-110 md:top-[38%]',
)}
>
- <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">
+ <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 md:w-[82%] xl:w-[69%]">
<span className="flex items-center gap-1 text-xs font-semibold tracking-wide">
TypeScript Foundations
</span>
</div>
- <div className="flex w-[69%] flex-col">
+ <div className="flex w-[69%] flex-col md:w-[82%] xl:w-[69%]">
{mockChallenges.map((mockChallenge) => (
<MockTrackChallenge
key={`mock-${mockChallenge.id}`}
diff --git a/apps/web/src/app/[locale]/_components/features.tsx b/apps/web/src/app/[locale]/_components/features.tsx
index 1fc72e1a..384f8460 100644
--- a/apps/web/src/app/[locale]/_components/features.tsx
+++ b/apps/web/src/app/[locale]/_components/features.tsx
@@ -26,7 +26,7 @@ import {
export function Features() {
return (
<section className="relative overflow-hidden" id="features">
- <div className="container mb-[64px] grid items-center justify-center">
+ <div className="mx-auto mb-[64px] grid max-w-[1400px] items-center justify-center px-4 lg:px-24">
<div className="flex flex-col items-center justify-center gap-16">
<div className="mt-1 flex flex-col gap-3 px-4 text-center sm:px-0">
<a
@@ -60,20 +60,20 @@ export function Features() {
<Balancer>All you need to become a TypeScript menace</Balancer>
</p>
</div>
- <div className="relative z-10 grid w-full gap-8 lg:grid-cols-2">
+ <div className="relative z-10 grid w-full gap-4 md:grid-cols-2 lg:gap-8 sm:[&>*:nth-child(3)]:hidden md:[&>*:nth-child(3)]:block">
<ImageCard
imgClass1={clsx(
'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%]',
+ '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-[1%] xl:-bottom-[11%] sm:left-[40px] md:w-[69%]',
'md:group-hover:translate-x-2 md:group-hover:scale-95',
)}
imgClass2={clsx(
'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%]',
+ '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-[2%] xl:-bottom-[12%] md:w-[77%]',
'md:group-hover:scale-105 md: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"
+ bgClass="md:bg-gradient-to-br"
image={{
dark1: FeatureCardChallengeDark2,
dark2: FeatureCardChallengeDark1,
@@ -85,7 +85,7 @@ export function Features() {
/>
<CollaborativeEnvironmentCard
description="Developers can share solutions and engage in discussions through commenting"
- bgClass="lg:bg-gradient-to-bl"
+ bgClass="md:bg-gradient-to-bl"
title="Collaborative Environment"
/>
<ChallengeCreationCard
@@ -114,7 +114,7 @@ export function Features() {
'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"
+ bgClass="md:bg-gradient-to-tr"
image={{
step1dark1: Step1Dark1,
step1dark2: Step1Dark2,
@@ -132,7 +132,7 @@ export function Features() {
/>
<CuratedTracksCard
description="Tracks are curated challenges, spanning various topics and difficulty levels, to advance your TypeScript skills."
- bgClass="lg:bg-gradient-to-tl"
+ bgClass="md:bg-gradient-to-tl"
title="Learning Tracks"
/>
</div>
diff --git a/apps/web/src/app/[locale]/_components/hero.tsx b/apps/web/src/app/[locale]/_components/hero.tsx
index cc9f870e..3c3a89b7 100644
--- a/apps/web/src/app/[locale]/_components/hero.tsx
+++ b/apps/web/src/app/[locale]/_components/hero.tsx
@@ -150,7 +150,7 @@ export async function Hero() {
<div className="absolute inset-10 -z-30 overflow-hidden rounded-full opacity-70 lg:hidden">
<BackgroundGrid />
</div>
- <div className="container relative grid min-h-screen items-center justify-center lg:min-h-0 lg:grid-cols-2">
+ <div className="container relative grid min-h-screen items-center justify-center py-24 lg:min-h-0 lg:grid-cols-2 lg:py-0">
<BeamOfLight />
<div className="flex w-full flex-col items-center justify-center gap-10 lg:items-start">
<a