-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dff745e
commit 5771f0c
Showing
26 changed files
with
105 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Use a wider centered container (1800px wide at 4XL (2000px) breakpoint) | ||
export const wrapper = | ||
"cc 3xl:px-100 4xl:px-[calc((100%-1800px)/2)] rs-pt-2 rs-pb-1 transition"; | ||
|
||
export const bgColors = { | ||
none: "bg-transparent", | ||
black: "bg-black text-white", | ||
white: "bg-white text-stone-dark", | ||
blue: "cen-blue-xlight", | ||
"fog-light": "bg-fog-light text-stone-dark", | ||
"red-gradient": "bg-cen-red-gradient text-white", | ||
"stone-dark": "bg-stone-dark text-white", | ||
}; | ||
|
||
export type BgColorType = keyof typeof bgColors | ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { HTMLAttributes } from "react"; | ||
import { cnb } from "cnbuilder"; | ||
import { FlexBox } from "@/components/FlexBox"; | ||
import * as styles from "./Footer.styles"; | ||
import { EngLogoLockup } from "../Logo/EngLogoLockup"; | ||
|
||
type FooterProps = HTMLAttributes<HTMLDivElement> & { | ||
isOverlap?: boolean; | ||
bgColor?: styles.BgColorType; | ||
}; | ||
|
||
export const Footer = ({ | ||
bgColor = "none", | ||
className = "", | ||
...props | ||
}: FooterProps) => { | ||
// Map background colors to logo colors | ||
const logoColorMap: Record<styles.BgColorType, "white" | "default"> = { | ||
black: "white", | ||
"red-gradient": "white", | ||
"stone-dark": "white", | ||
none: "default", | ||
white: "white", | ||
blue: "default", | ||
"fog-light": "default", | ||
"": "default", | ||
}; | ||
|
||
const isLight = logoColorMap[bgColor] || "default"; | ||
|
||
return ( | ||
<footer | ||
{...props} | ||
className={cnb(styles.bgColors[bgColor || "none"], className)} | ||
> | ||
<FlexBox alignItems="start" className={styles.wrapper}> | ||
<EngLogoLockup color={isLight} /> | ||
</FlexBox> | ||
</footer> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from "./Footer"; | ||
export * from "./Footer.styles"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.