Skip to content

Commit efc701b

Browse files
authored
Lead capture banner (#2998)
1 parent f4cb9e1 commit efc701b

File tree

8 files changed

+114
-28
lines changed

8 files changed

+114
-28
lines changed
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import React from "react";
2+
import LearnMoreLink from "./LearnMoreLink";
3+
4+
const CalloutBanner = ({ fullWidth = false }) => {
5+
return (
6+
<div
7+
className={`rounded-xl bg-[#202020] mb-24 ${!fullWidth ? "w-[65%]" : ""} m-auto py-6 px-8 border-solid border-[6px] border-[#8F4438] outline outline-[6px] outline-[#FF684F]`}
8+
>
9+
<p className="m-0 text-[var(--ifm-color-primary)] text-xl font-bold">
10+
Like this project? You&apos;ll love working with us.
11+
</p>
12+
<div className="flex flex-col sm:flex-row mt-2.5 items-end justify-between">
13+
<p className="m-0 text-white text-sm mb-6 sm:mb-0">
14+
Contact us to learn more about our full range of services and
15+
offerings.
16+
</p>
17+
<LearnMoreLink className="text-white text-sm font-bold flex items-center justify-between min-w-[100px] gap-1.5 underline underline-offset-4 decoration-2 text-[var(--ifm-color-primary)] hover:text-white" />
18+
</div>
19+
</div>
20+
);
21+
};
22+
23+
export default CalloutBanner;
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import React from "react";
2+
import { ComponentProps } from "react";
3+
import { FaArrowRight } from "react-icons/fa";
4+
5+
export default function LearnMoreLink(
6+
props: Omit<ComponentProps<"a">, "href">,
7+
) {
8+
return (
9+
<a
10+
href="https://commerce.nearform.com/contact?lead_source_2_0=Open%20Source"
11+
target="_blank"
12+
rel="noreferrer"
13+
{...props}
14+
>
15+
Learn More
16+
<FaArrowRight height={40} width={40} scale={5} />
17+
</a>
18+
);
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import React from "react";
2+
import LearnMoreLink from "./LearnMoreLink";
3+
4+
export default function SidebarLeadBanner() {
5+
return (
6+
<aside className="rounded-xl bg-[#f2f2f2] m-3 py-7 px-9 text-[#606770]">
7+
<p className="text-base font-bold">
8+
Like this project? You&apos;ll love working with us.
9+
</p>
10+
<p className="text-sm">
11+
Contact us to learn more about our full range of services and offerings.
12+
</p>
13+
<LearnMoreLink className="text-[#606770] hover:text-[var(--ifm-color-primary)] text-sm font-bold flex items-center justify-end min-w-[100px] gap-1.5 underline underline-offset-4 decoration-2" />
14+
</aside>
15+
);
16+
}

website/src/css/custom.css

+9-9
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,31 @@ body {
1313
}
1414

1515
@font-face {
16-
font-family: 'Inter';
17-
src: url('/font/InterRegular.woff2') format('woff2');
16+
font-family: "Inter";
17+
src: url("/font/InterRegular.woff2") format("woff2");
1818
font-weight: 400;
1919
font-style: normal;
2020
font-display: swap;
2121
}
2222

2323
@font-face {
24-
font-family: 'Inter';
25-
src: url('/font/InterMedium.woff2') format('woff2');
24+
font-family: "Inter";
25+
src: url("/font/InterMedium.woff2") format("woff2");
2626
font-weight: 500;
2727
font-style: normal;
2828
font-display: swap;
2929
}
3030

3131
@font-face {
32-
font-family: 'Inter';
33-
src: url('/font/InterBold.woff2') format('woff2');
32+
font-family: "Inter";
33+
src: url("/font/InterBold.woff2") format("woff2");
3434
font-weight: 700;
3535
font-style: normal;
3636
font-display: swap;
3737
}
3838

3939
.hero-pattern {
40-
background-image: url('/img/hero-background.svg');
40+
background-image: url("/img/hero-background.svg");
4141
}
4242

4343
:root {
@@ -57,7 +57,7 @@ body {
5757
--ifm-footer-padding-vertical: 1rem;
5858
}
5959

60-
[data-theme='dark'] {
60+
[data-theme="dark"] {
6161
--ifm-color-primary: #ff684f;
6262
--ifm-color-primary-dark: #ff4b2e;
6363
--ifm-color-primary-darker: #ff3d1d;
@@ -73,7 +73,7 @@ body {
7373

7474
/* Nav */
7575
.header-github-link::before {
76-
content: '';
76+
content: "";
7777
width: 24px;
7878
height: 24px;
7979
display: flex;
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
import React from "react";
2-
import { LinkButton } from "../../components/link-button";
3-
import { LandingDivider } from "./landing-divider";
2+
import LearnMoreLink from "../../components/LearnMoreLink";
43

5-
export const LandingBanner = ({
6-
body,
7-
cta,
8-
heading,
9-
showDivider,
10-
}: {
11-
body: string;
12-
cta: { link: string; text: string };
13-
heading: string;
14-
showDivider?: boolean;
15-
}) => (
16-
<div className="flex flex-col text-left mx-16 lg:mx-32 xl:mx-64 my-8">
17-
{showDivider && <LandingDivider />}
18-
19-
<h2 className="my-8 text-4xl font-semibold">{heading}</h2>
20-
<p className="text-lg">{body}</p>
21-
<LinkButton link={cta.link}>{cta.text}</LinkButton>
4+
export const LandingBanner = () => (
5+
<div className="bg-[#4589FF] text-white py-7 px-5 sm:py-2 sm:px-4">
6+
<div className="lg:max-w-[90%] flex flex-col sm:flex-row justify-between sm:items-center m-auto">
7+
<div className="flex flex-col sm:flex-row gap-2.5">
8+
<p className="m-0 text-sm font-bold">
9+
Like this project? You&apos;ll love working with us.
10+
</p>
11+
<p className="m-0 text-sm">
12+
Contact us to learn more{" "}
13+
<span className="hidden lg:inline">
14+
about our full range of services and offerings.
15+
</span>
16+
</p>
17+
</div>
18+
<LearnMoreLink className="text-white text-sm font-bold flex items-center justify-end gap-1.5 underline underline-offset-4 decoration-2 hover:text-white mt-2.5 sm:mt-0" />
19+
</div>
2220
</div>
2321
);

website/src/pages/index.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { LandingFeaturedProjects } from "./_components/landing-featured-projects
66
import { LandingFeatures } from "./_components/landing-features";
77
import { LandingDemo } from "./_components/landing-demo";
88
import { LandingShowcase } from "./_components/landing-showcase";
9+
import CalloutBanner from "../components/CalloutBanner";
910

1011
// eslint-disable-next-line no-undef
1112
export default function Home(): JSX.Element {
@@ -16,6 +17,7 @@ export default function Home(): JSX.Element {
1617
<LandingFeatures />
1718
<LandingShowcase />
1819
<LandingFeaturedProjects />
20+
<CalloutBanner />
1921
</Layout>
2022
);
2123
}

website/src/theme/DocItem/index.tsx

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React from "react";
2+
import OriginalDocItem from "@theme-original/DocItem";
3+
import CalloutBanner from "@site/src/components/CalloutBanner";
4+
5+
export default function DocItem(props) {
6+
return (
7+
<>
8+
<OriginalDocItem {...props} />
9+
<div className="mt-20 min-[997px]:hidden">
10+
<CalloutBanner fullWidth />
11+
</div>
12+
</>
13+
);
14+
}
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React from "react";
2+
import OriginalDocSidebar from "@theme-original/DocSidebar";
3+
import SidebarLeadBanner from "@site/src/components/SidebarLeadBanner";
4+
5+
export default function DocSidebar(props) {
6+
return (
7+
<div className="flex flex-col h-full">
8+
<div className="flex-1 overflow-x-hidden">
9+
<OriginalDocSidebar {...props} />
10+
</div>
11+
<SidebarLeadBanner />
12+
</div>
13+
);
14+
}

0 commit comments

Comments
 (0)