Skip to content

Commit 16ce4b1

Browse files
committed
[Homepage] Replace DevPlat cards with video
1 parent 9ae9a74 commit 16ce4b1

File tree

2 files changed

+45
-25
lines changed

2 files changed

+45
-25
lines changed

src/components/homepage/FeaturedContentSection.astro

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { z } from "astro:schema";
44
import { marked } from "marked";
55
66
import { CardGrid, Card, LinkCard } from "@astrojs/starlight/components";
7+
import Stream from "../Stream.astro";
78
89
const props = z.object({
910
title: z.string(),
@@ -47,17 +48,35 @@ const { title, text, image, cards, imagePosition } = props.parse(Astro.props);
4748
</div>
4849
)
4950
}
50-
<CardGrid>
51+
52+
<div class="w-full">
5153
{
52-
cards.map((card) => (
53-
<Card title={card.title}>
54-
<span set:html={marked.parse(card.text)} />
55-
<br />
56-
<LinkCard title={card.cta.title} href={card.cta.href} />
57-
</Card>
58-
))
54+
title === "Developer Platform" ? (
55+
<div class="[&>article]:gap-0">
56+
<Card title="">
57+
<Stream
58+
videoId="d89f290431f98e551f2b1467f85d6561"
59+
videoTitle="foo"
60+
thumbnailStartTime="517s"
61+
/>
62+
63+
<LinkCard title={"Explore our Developer Platform"} href={"/products/?product-group=Developer+platform"} />
64+
</Card>
65+
</div>
66+
) : (
67+
<CardGrid>
68+
{cards.map((card) => (
69+
<Card title={card.title}>
70+
<span set:html={marked.parse(card.text)} />
71+
<br />
72+
<LinkCard title={card.cta.title} href={card.cta.href} />
73+
</Card>
74+
))}
75+
</CardGrid>
76+
)
5977
}
60-
</CardGrid>
78+
</div>
79+
6180
{
6281
imagePosition === "after" && (
6382
<div class="w-full m-8">

src/pages/index.astro

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -119,22 +119,23 @@ const featuredSections = [
119119
},
120120
imagePosition: "before",
121121
cards: [
122-
{
123-
title: "Create API Tokens",
124-
text: "If you are going to be using the Cloudflare API, you first need an API token to authenticate your requests.",
125-
cta: {
126-
title: "Create Tokens",
127-
href: "/fundamentals/api/get-started/create-token/",
128-
},
129-
},
130-
{
131-
title: "View Workers Examples",
132-
text: "Review fully functional sample scripts to get started with Workers.",
133-
cta: {
134-
title: "View Examples",
135-
href: "/workers/examples/",
136-
},
137-
},
122+
// Currently unused.
123+
// {
124+
// title: "Create API Tokens",
125+
// text: "If you are going to be using the Cloudflare API, you first need an API token to authenticate your requests.",
126+
// cta: {
127+
// title: "Create Tokens",
128+
// href: "/fundamentals/api/get-started/create-token/",
129+
// },
130+
// },
131+
// {
132+
// title: "View Workers Examples",
133+
// text: "Review fully functional sample scripts to get started with Workers.",
134+
// cta: {
135+
// title: "View Examples",
136+
// href: "/workers/examples/",
137+
// },
138+
// },
138139
],
139140
},
140141
{

0 commit comments

Comments
 (0)