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: about section layout #69

Merged
merged 8 commits into from
Feb 17, 2025
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
58 changes: 58 additions & 0 deletions src/components/about-section-layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
"use client";

import CustomLink from "./link";
import { useDictionary } from "@/contexts/dictionary-provider";
import { horizontalPadding } from "@/lib/styling";

interface AboutSectionProps {
title: string;
subtitle: string;
href: string;
children: React.ReactNode;
}

const AboutSectionLayout = ({
title,
subtitle,
href,
children,
}: AboutSectionProps) => {
const dict = useDictionary();

return (
<div
className={`flex flex-col items-stretch py-10 sm:flex-row sm:py-12 ${horizontalPadding}`}
>
<div className="mb-4 flex w-full items-center sm:mr-6 sm:w-20">
<div className="flex h-fit flex-1 items-center justify-start sm:h-full sm:w-full sm:items-start sm:justify-center">
<span className="w-fit origin-right font-title text-2xl font-medium sm:translate-x-[-50%] sm:translate-y-[-50%] sm:-rotate-90 sm:pr-1 sm:text-3xl">
{title}
</span>
</div>
<span className="pt-1 sm:hidden">
<CustomLink
title={dict.button.see_more}
href={href}
arrow="forward"
/>
</span>
</div>

<div>
<div className="flex justify-start">{subtitle}</div>

<div className="mt-4 hidden sm:block">
<CustomLink
title={dict.button.see_more}
href={href}
arrow="forward"
/>
</div>

<div className="mt-7 sm:mt-10">{children}</div>
</div>
</div>
);
};

export default AboutSectionLayout;
1 change: 1 addition & 0 deletions src/internationalization/dictionaries/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"button": {
"see_team": "Go to team",
"learn_more": "Learn more",
"see_more": "See more",
"back": "Go Back"
},
"collaborate_card": {
Expand Down
1 change: 1 addition & 0 deletions src/internationalization/dictionaries/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"button": {
"see_team": "Ver direção",
"learn_more": "Saber mais",
"see_more": "Ver mais",
"back": "Voltar"
},
"collaborate_card": {
Expand Down