Skip to content

Commit 277949b

Browse files
committed
wip
1 parent 7f83098 commit 277949b

File tree

7 files changed

+153
-37
lines changed

7 files changed

+153
-37
lines changed

package-lock.json

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
"react-icons": "5.5.0",
9393
"react-instantsearch": "7.15.4",
9494
"react-markdown": "10.0.1",
95+
"react-tabs": "6.1.0",
9596
"redirects-in-workers": "0.0.5",
9697
"rehype": "13.0.2",
9798
"rehype-autolink-headings": "7.1.0",

src/assets/network-map.svg

Lines changed: 9 additions & 0 deletions
Loading

src/components/homepage/Changelog.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const changelogs = await getChangelogs({}).then((arr) => arr.slice(0, 5));
66
---
77

88
<h2>Documentation changelog</h2>
9-
<div class="h-[28rem] w-3/4 overflow-y-scroll rounded border px-6 py-4">
9+
<div class="h-[28rem] w-3/5 overflow-y-scroll rounded border px-6 py-4">
1010
<ul class="overflow-y-scroll pl-0">
1111
{
1212
changelogs.map(async (changelog) => {

src/components/homepage/Offerings.astro

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
import { Tab, Tabs, TabList, TabPanel } from "react-tabs";
2+
import MapSvg from "~/assets/network-map.svg?raw";
3+
4+
const tabs = ["Overview", "Connect & Protect", "Build"];
5+
6+
const connectCards = [
7+
{
8+
label: "For websites & web apps",
9+
description: "DNS, CDN, L7 DDoS protection, WAF, and more.",
10+
cta: {
11+
primary: {
12+
label: "Proxy your domain",
13+
href: "/fundamentals/setup/manage-domains/connect-your-domain/",
14+
},
15+
secondary: {
16+
label: "All application services",
17+
href: "/products/?product-group=Analytics%2CApplication+performance%2CApplication+security%2CCloudflare+essentials",
18+
},
19+
},
20+
},
21+
{
22+
label: "For internal networking & Zero Trust security",
23+
description: "Access, Gateway, Tunnels, CASB, and more.",
24+
cta: {
25+
primary: {
26+
label: "Set up Zero Trust",
27+
href: "/cloudflare-one/setup/",
28+
},
29+
secondary: {
30+
label: "All Zero Trust services",
31+
href: "/products/?product-group=Cloudflare+One",
32+
},
33+
},
34+
},
35+
{
36+
label: "For public, private, and hybrid networks",
37+
description: "L3 DDoS protection, firewall, interconnects, and more.",
38+
cta: {
39+
primary: {
40+
label: "Onramp your network",
41+
href: "/TODO/",
42+
},
43+
secondary: {
44+
label: "All network services",
45+
href: "/products/?product-group=Network+security",
46+
},
47+
},
48+
},
49+
{
50+
label: "For personal devices and home networks",
51+
description: "1.1.1.1, WARP client, and Radar.",
52+
cta: {
53+
primary: {
54+
label: "Download WARP",
55+
href: "/warp-client/get-started/",
56+
},
57+
secondary: {
58+
label: "All consumer services",
59+
href: "/products/?product-group=Consumer+services",
60+
},
61+
},
62+
},
63+
] as const;
64+
65+
export default function OfferingsTabs() {
66+
return (
67+
<Tabs className="not-content w-full shadow-md">
68+
<TabList className="grid list-none grid-cols-3 gap-2 pl-0 text-center">
69+
{tabs.map((tab, index) => (
70+
<Tab
71+
key={index}
72+
className="h-14 rounded-t border-l border-r border-t p-4 font-semibold"
73+
>
74+
{tab}
75+
</Tab>
76+
))}
77+
</TabList>
78+
79+
<TabPanel>
80+
<div className="flex items-center justify-center gap-6">
81+
<div dangerouslySetInnerHTML={{ __html: MapSvg }} />
82+
<div>
83+
<div>
84+
<p className="text-xl font-semibold">What is Cloudflare?</p>
85+
<p>
86+
Connect to or build on top of Cloudflare’s global network to
87+
speed up and protect your apps, employees, and networks.
88+
</p>
89+
</div>
90+
<div className="flex gap-4">
91+
<a href="https://dash.cloudflare.com/login">Sign up</a>
92+
<a href="/fundamentals/">Learn more</a>
93+
</div>
94+
</div>
95+
</div>
96+
</TabPanel>
97+
<TabPanel className="p-6">
98+
<div className="flex flex-col gap-4">
99+
<p className="text-center text-xl font-semibold">
100+
Secure and accelerate anything connected to Cloudflare.
101+
</p>
102+
<div className="grid grid-cols-2 gap-4 lg:grid-cols-4">
103+
{connectCards.map((card) => (
104+
<div className="flex flex-col items-center gap-4 rounded border p-6 shadow-sm">
105+
<div className="text-center">
106+
<p className="font-semibold">{card.label}</p>
107+
<p>{card.description}</p>
108+
</div>
109+
<a className="mt-auto block min-w-16 text-nowrap rounded border border-cl1-brand-orange px-6">
110+
Proxy your domain
111+
</a>
112+
<a className="block min-w-16 text-nowrap px-6">
113+
All application services
114+
</a>
115+
</div>
116+
))}
117+
</div>
118+
</div>
119+
</TabPanel>
120+
<TabPanel>
121+
<p>Content for Tab 3</p>
122+
</TabPanel>
123+
</Tabs>
124+
);
125+
}

src/pages/index.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import GetStarted from "~/components/homepage/GetStarted.astro";
99
import BuildWithCloudflare from "~/components/homepage/BuildWithCloudflare.astro";
1010
import BottomLinks from "~/components/homepage/BottomLinks.astro";
1111
import Offerings from "~/components/homepage/Offerings.astro";
12+
import OfferingsTabs from "~/components/homepage/OfferingsTabs.tsx";
1213
import Changelog from "~/components/homepage/Changelog.astro";
1314
1415
const props = {
@@ -29,7 +30,7 @@ const props = {
2930
<TopCards />
3031
</div>
3132
<div class="flex flex-col items-center justify-center gap-10">
32-
<Offerings />
33+
<OfferingsTabs client:load />
3334
</div>
3435
<div class="flex flex-col items-center justify-center gap-10">
3536
<GetStarted />

0 commit comments

Comments
 (0)