Numbered Cards large breakpoint

This commit is contained in:
adilallo
2025-08-17 15:00:06 -06:00
parent 6b214f2711
commit 3ab67d5096
3 changed files with 58 additions and 38 deletions
+6 -6
View File
@@ -4,15 +4,15 @@ import SectionNumber from "./SectionNumber";
const NumberedCard = ({ number, text, iconShape, iconColor }) => { const NumberedCard = ({ number, text, iconShape, iconColor }) => {
return ( return (
<div className="bg-[var(--color-surface-inverse-primary)] rounded-[12px] p-5 shadow-lg flex flex-col gap-4 sm:p-8 sm:gap-8 sm:flex-row sm:items-center"> <div className="bg-[var(--color-surface-inverse-primary)] rounded-[12px] p-5 shadow-lg flex flex-col gap-4 sm:p-8 sm:gap-8 sm:flex-row sm:items-center lg:p-8 lg:gap-0 lg:flex-row lg:items-stretch lg:relative lg:h-[238px]">
{/* Section Number - Left part (sm breakpoint) */} {/* Section Number - Top right (lg breakpoint) */}
<div className="flex justify-end sm:justify-start sm:flex-shrink-0"> <div className="flex justify-end sm:justify-start sm:flex-shrink-0 lg:absolute lg:top-8 lg:right-8">
<SectionNumber number={number} /> <SectionNumber number={number} />
</div> </div>
{/* Card Content - Right part (sm breakpoint) */} {/* Card Content - Bottom left (lg breakpoint) */}
<div className="sm:flex-1"> <div className="sm:flex-1 lg:absolute lg:bottom-8 lg:left-8 lg:right-16">
<p className="font-bricolage-grotesque font-medium text-[24px] leading-[32px] sm:font-normal sm:leading-[24px] text-[#141414]"> <p className="font-bricolage-grotesque font-medium text-[24px] leading-[32px] sm:font-normal sm:leading-[24px] sm:text-[24px] text-[#141414]">
{text} {text}
</p> </p>
</div> </div>
+20 -5
View File
@@ -6,15 +6,20 @@ import Button from "./Button";
const NumberedCards = ({ title, subtitle, cards }) => { const NumberedCards = ({ title, subtitle, cards }) => {
return ( return (
<section className="bg-transparent py-8 px-5 sm:py-12 sm:px-8"> <section className="bg-transparent py-[var(--spacing-scale-032)] px-[var(--spacing-scale-020)] sm:py-[var(--spacing-scale-048)] sm:px-[var(--spacing-scale-032)] lg:py-[var(--spacing-scale-064)] lg:px-[var(--spacing-scale-064)]">
<div className="max-w-[var(--spacing-measures-max-width-lg)] mx-auto"> <div className="max-w-[var(--spacing-measures-max-width-lg)] mx-auto">
<div className="grid grid-cols-1 gap-y-[var(--spacing-scale-032)] lg:gap-y-[var(--spacing-scale-056)]">
{/* Section Header */} {/* Section Header */}
<div className="mb-8 sm:mb-8"> <div>
<SectionHeader title={title} subtitle={subtitle} /> <SectionHeader
title={title}
subtitle={subtitle}
titleLg="How CommunityRule helps"
/>
</div> </div>
{/* Cards Container */} {/* Cards Container */}
<div className="space-y-8 sm:space-y-8"> <div className="grid grid-cols-1 gap-y-[var(--spacing-scale-024)] lg:grid-cols-3 lg:gap-[var(--spacing-scale-024)]">
{cards.map((card, index) => ( {cards.map((card, index) => (
<NumberedCard <NumberedCard
key={index} key={index}
@@ -27,11 +32,21 @@ const NumberedCards = ({ title, subtitle, cards }) => {
</div> </div>
{/* Call to Action Button */} {/* Call to Action Button */}
<div className="text-center mt-8 sm:text-left sm:mt-8"> <div className="text-center sm:text-left lg:text-center">
{/* Default button for xsm and sm breakpoints */}
<div className="block lg:hidden">
<Button variant="default" size="large"> <Button variant="default" size="large">
Create CommunityRule Create CommunityRule
</Button> </Button>
</div> </div>
{/* Outlined button for lg and xlg breakpoints */}
<div className="hidden lg:block">
<Button variant="outlined" size="large">
See how it works
</Button>
</div>
</div>
</div>
</div> </div>
</section> </section>
); );
+12 -7
View File
@@ -1,18 +1,23 @@
"use client"; "use client";
const SectionHeader = ({ title, subtitle }) => { const SectionHeader = ({ title, subtitle, titleLg }) => {
return ( return (
<div className="flex flex-col gap-1 w-full"> <div className="flex flex-col gap-1 w-full lg:flex-row lg:justify-between lg:items-start">
{/* Title - Bricolage Grotesque */} {/* Title Container - Left side (lg breakpoint) */}
<h2 className="font-bricolage-grotesque font-bold text-[28px] leading-[36px] sm:text-[32px] sm:leading-[40px] text-[var(--color-content-default-primary)]"> <div className="lg:w-[369px] lg:h-[120px] lg:flex lg:items-center">
{title} <h2 className="font-bricolage-grotesque font-bold text-[28px] leading-[36px] sm:text-[32px] sm:leading-[40px] lg:text-[32px] lg:leading-[40px] lg:w-[369px] lg:pr-24 text-[var(--color-content-default-primary)]">
<span className="block lg:hidden">{title}</span>
<span className="hidden lg:block">{titleLg || title}</span>
</h2> </h2>
</div>
{/* Subtitle - Inter */} {/* Subtitle Container - Right side (lg breakpoint) */}
<p className="font-inter font-normal text-[18px] leading-[130%] sm:text-[18px] sm:leading-[32px] text-[#484848] sm:text-[var(--color-content-default-tertiary)] tracking-[0px]"> <div className="lg:w-[928px] lg:h-[120px] lg:flex lg:items-center lg:justify-end">
<p className="font-inter font-normal text-[18px] leading-[130%] sm:text-[18px] sm:leading-[32px] lg:text-[24px] lg:leading-[32px] text-[#484848] sm:text-[var(--color-content-default-tertiary)] lg:text-[var(--color-content-default-tertiary)] tracking-[0px]">
{subtitle} {subtitle}
</p> </p>
</div> </div>
</div>
); );
}; };