Skip to content

Commit c00977c

Browse files
KianNHjason-cf
andauthored
[Homepage] Replace DevPlat cards with video (#17403)
* [Homepage] Replace DevPlat cards with video * updating thumbnail * adding the cf-stack image to assets --------- Co-authored-by: Jason Farber <[email protected]>
1 parent f9c0783 commit c00977c

File tree

3 files changed

+46
-25
lines changed

3 files changed

+46
-25
lines changed

src/assets/cloudflare-stack.jpg

569 KB
Loading

src/components/homepage/FeaturedContentSection.astro

Lines changed: 29 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,36 @@ 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+
thumbnailTimeOrURL="https://pub-d9bf66e086fb4b639107aa52105b49dd.r2.dev/cloudflare-stack.jpg"
61+
moreVideosLink="false"
62+
/>
63+
64+
<LinkCard title={"Explore our Developer Platform"} href={"/products/?product-group=Developer+platform"} />
65+
</Card>
66+
</div>
67+
) : (
68+
<CardGrid>
69+
{cards.map((card) => (
70+
<Card title={card.title}>
71+
<span set:html={marked.parse(card.text)} />
72+
<br />
73+
<LinkCard title={card.cta.title} href={card.cta.href} />
74+
</Card>
75+
))}
76+
</CardGrid>
77+
)
5978
}
60-
</CardGrid>
79+
</div>
80+
6181
{
6282
imagePosition === "after" && (
6383
<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)