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

fix: show a flat gradient in the UseCase section #1440

Merged
merged 2 commits into from
Oct 19, 2023
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
7 changes: 7 additions & 0 deletions frontend/app/(home)/components/HomeSection/HomeSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ type HomeSectionProps = {
slantCurrent?: "up" | "down" | "none";
slantBefore?: "up" | "down" | "none";
slantAfter?: "up" | "down" | "none";
gradient?: string;
hiddenOnMobile?: boolean;
children: React.ReactNode;
className?: string;
Expand All @@ -17,6 +18,7 @@ export const HomeSection = ({
slantCurrent = "none",
slantBefore = "none",
slantAfter = "none",
gradient,
hiddenOnMobile = false,
className,
children,
Expand All @@ -38,6 +40,11 @@ export const HomeSection = ({
<section className="flex flex-col items-center w-full max-w-6xl z-[2] py-8">
{children}
</section>
{gradient !== undefined ? (
<div
className={`absolute w-screen bottom-[calc(100vw*tan(6deg))] left-0 h-[30%] ${gradient}`}
/>
) : null}
</div>
);
};
2 changes: 1 addition & 1 deletion frontend/app/(home)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const HomePage = (): JSX.Element => {
<HomeSection
bg="bg-[#362469]"
slantCurrent="down"
className="bg-gradient-to-b from-[#362469] from-75% to-white"
gradient="bg-gradient-to-t bg-gradient-to-t from-white to-[#362469]"
>
<UseCases />
<div />
Expand Down