Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(grid): responsive grid layout with dynamic column widths #1417

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ export default function SectionExample(props: TestiomonialsProps) {
image={item?.companyLogoLight}
elProps={{
alt: item?.companyLogoLight?.alt,
className:
"h-full object-contain dark:hidden w-max",
className: "h-full object-contain dark:hidden",
}}
/>
<SanityImage
Expand All @@ -89,7 +88,7 @@ export default function SectionExample(props: TestiomonialsProps) {
elProps={{
alt: item?.companyLogoDark?.alt,
className:
"h-full object-contain hidden dark:block w-max",
"h-full object-contain hidden dark:block",
}}
/>
</div>
Expand All @@ -105,7 +104,7 @@ export default function SectionExample(props: TestiomonialsProps) {
elProps={{
alt: item?.image?.alt,
className:
"h-[44px] w-[44px] object-cover w-max rounded-[4px]",
"h-[44px] w-[44px] object-cover rounded-[4px]",
}}
/>

Expand Down Expand Up @@ -138,8 +137,7 @@ export default function SectionExample(props: TestiomonialsProps) {
image={item?.companyLogoLight}
elProps={{
alt: item?.companyLogoLight?.alt,
className:
"h-full object-contain dark:hidden w-max",
className: "h-full object-contain dark:hidden",
}}
/>
<SanityImage
Expand All @@ -148,7 +146,7 @@ export default function SectionExample(props: TestiomonialsProps) {
elProps={{
alt: item?.companyLogoDark?.alt,
className:
"h-full object-contain hidden dark:block w-max",
"h-full object-contain hidden dark:block",
}}
/>
</div>
Expand All @@ -164,7 +162,7 @@ export default function SectionExample(props: TestiomonialsProps) {
elProps={{
alt: item?.image?.alt,
className:
"h-[44px] w-[44px] object-cover w-max rounded-[4px]",
"h-[44px] w-[44px] object-cover rounded-[4px]",
}}
/>

Expand Down
17 changes: 11 additions & 6 deletions apps/frontend/components/templates/AboutPage/AboutPageContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function ParagraphWithTitle(props: PargraphProps) {
}}
>
<h2 className="m-heading text-center">{props.title}</h2>
<div className="body-l max-w-[480px] text-balance text-center">
<div className="body-l max-w-[768px] text-balance text-center">
<RichText value={props.content} />
</div>
</GradientBorderBox>
Expand All @@ -104,7 +104,12 @@ function TeamGrid(props: GridProps) {
<Section className="w-full py-2xl lg:py-[80px]">
<div className="flex flex-col gap-l">
<h2 className="l-heading text-center">{props.title}</h2>
<div className="grid grid-cols-2 gap-0 lg:grid-cols-4 lg:gap-x-0 lg:gap-y-xs">
<div
className="grid gap-6 lg:gap-8"
style={{
gridTemplateColumns: "repeat(auto-fit, minmax(280px, 1fr))",
}}
>
{props.teamMembers.map((member) => (
<TeamMemberGridItem key={member.name} {...member} />
))}
Expand Down Expand Up @@ -140,16 +145,16 @@ function TeamMemberGridItem(props: TeamMemberProps) {
);

return (
<div className="flex flex-col p-s lg:p-m ">
<div className="flex flex-col">
<div className="flex h-full flex-col">
<div className="max-h-[212px] max-w-[212px] bg-emphasis-light lg:h-[212px] lg:w-[212px] dark:bg-emphasis-dark">
<div className="bg-emphasis-light dark:bg-emphasis-dark overflow-hidden rounded-[4px]">
{props.image ? (
<SanityImage
maxWidth={212}
maxWidth={500}
image={props.image}
alt={props.image?.alt}
elProps={{
className: "rounded-[4px]",
className: "rounded-[4px] w-full aspect-square",
}}
/>
) : (
Expand Down
Loading