11---
22import { Tag , Typography } from " @chainlink/blocks"
3+ import { JourneyTabGrid } from " ./JourneyTabGrid"
34
45const columns = [
56 {
@@ -8,25 +9,25 @@ const columns = [
89 {
910 title: " Explore Cross-Chain Interoperability with CCIP" ,
1011 description: " Learn cross-chain concepts, workflows, and real-world use cases." ,
11- badge: " CCIP " ,
12+ badge: " ccip " ,
1213 href: " /" ,
1314 },
1415 {
1516 title: " Understand How Data Feeds Power dApps" ,
1617 description: " See how oracle data feeds deliver price feeds and reference data." ,
17- badge: " DATA FEEDS " ,
18+ badge: " data feeds " ,
1819 href: " /" ,
1920 },
2021 {
2122 title: " Learn How Data Streams Deliver Real-Time Data" ,
2223 description: " Understand how low-latency streams support time-sensitive applications." ,
23- badge: " CCIP " ,
24+ badge: " data streams " ,
2425 href: " /" ,
2526 },
2627 {
2728 title: " Discover Off-Chain Compute with Functions" ,
2829 description: " Learn how Functions connect smart contracts to APIs and custom logic." ,
29- badge: " DATA FEEDS " ,
30+ badge: " functions " ,
3031 href: " /" ,
3132 },
3233 ],
@@ -37,25 +38,25 @@ const columns = [
3738 {
3839 title: " Build Cross-Chain Apps with CCIP Tutorials" ,
3940 description: " Follow step-by-step guides with language switching (EVM, Rust, Move, etc.)." ,
40- badge: " CCIP " ,
41+ badge: " ccip " ,
4142 href: " /" ,
4243 },
4344 {
4445 title: " Integrate Data Feeds into Smart Contracts" ,
4546 description: " Plug feeds into your apps with examples and addresses." ,
46- badge: " DATA FEEDS " ,
47+ badge: " data feeds " ,
4748 href: " /" ,
4849 },
4950 {
5051 title: " Implement Real-Time Use Cases with Data Streams" ,
5152 description: " Use low-latency data in trading, gaming, and other live applications." ,
52- badge: " CCIP " ,
53+ badge: " data streams " ,
5354 href: " /" ,
5455 },
5556 {
5657 title: " Connect Contracts to APIs with Functions" ,
5758 description: " Add external data and custom logic to your dApps." ,
58- badge: " DATA FEEDS " ,
59+ badge: " functions " ,
5960 href: " /" ,
6061 },
6162 ],
@@ -66,70 +67,94 @@ const columns = [
6667 {
6768 title: " Monitor CCIP Transactions in Real Time" ,
6869 description: " Track the progress and status of cross-chain transactions." ,
69- badge: " CCIP " ,
70+ badge: " ccip " ,
7071 href: " /" ,
7172 },
7273 {
7374 title: " Stay Up to Date with Data Feeds" ,
7475 description: " Rely on changelogs and schema updates for accuracy." ,
75- badge: " DATA FEEDS " ,
76+ badge: " data feeds " ,
7677 href: " /" ,
7778 },
7879 {
7980 title: " Deliver Reliable Low-Latency Data with Streams" ,
8081 description: " Operate Data Streams at scale for critical, time-sensitive use cases." ,
81- badge: " CCIP " ,
82+ badge: " data streams " ,
8283 href: " /" ,
8384 },
8485 {
8586 title: " Scale and Optimize Functions" ,
8687 description: " Debug, manage workloads, and grow your applications." ,
87- badge: " DATA FEEDS " ,
88+ badge: " functions " ,
8889 href: " /" ,
8990 },
9091 ],
9192 },
9293]
94+
95+ // Transform columns to tabs format for JourneyTabGrid
96+ const tabs = columns .map ((column ) => ({
97+ name: column .title ,
98+ items: column .items .map ((item ) => ({
99+ title: item .title ,
100+ description: item .description ,
101+ link: item .href ,
102+ badge: item .badge ,
103+ })),
104+ }))
93105---
94106
95107<section >
96- <Typography variant =" h4" className =" section-title" >Start your Chainlink journey</Typography >
97- <div class =" journey-cards" >
98- {
99- columns .map ((column ) => (
100- <div class = " journey-column" >
101- <header class = " column-header" >
102- <Typography variant = " h5" className = " column-title" >
103- { column .title }
104- </Typography >
105- </header >
106- { column .items .map ((item ) => (
107- <a href = { item .href } class = " journey-card" >
108- <div class = " card-content" >
109- <Typography variant = " body-semi" >{ item .title } </Typography >
110- <Typography variant = " body-s" color = " muted" >
111- { item .description }
112- </Typography >
113- </div >
114-
115- <footer class = " journey-footer" >
116- <Tag size = " sm" className = " footer-tag" >
117- <Typography variant = " code-s" >{ item .badge } </Typography >
118- </Tag >
119- <img src = " /assets/icons/upper-right-arrow.svg" class = " footer-icon" />
120- </footer >
121- </a >
122- ))}
123- </div >
124- ))
125- }
126- </div >
108+ <section class =" desktop" >
109+ <Typography variant =" h4" className =" section-title" >Start your Chainlink journey</Typography >
110+ <div class =" journey-cards" >
111+ {
112+ columns .map ((column ) => (
113+ <div class = " journey-column" >
114+ <header class = " column-header" >
115+ <Typography variant = " h5" className = " column-title" >
116+ { column .title }
117+ </Typography >
118+ </header >
119+ { column .items .map ((item ) => (
120+ <a href = { item .href } class = " journey-card" >
121+ <div class = " card-content" >
122+ <Typography variant = " body-semi" >{ item .title } </Typography >
123+ <Typography variant = " body-s" color = " muted" >
124+ { item .description }
125+ </Typography >
126+ </div >
127+
128+ <footer class = " journey-footer" >
129+ <Tag size = " sm" className = " footer-tag" >
130+ <Typography variant = " code-s" >{ item .badge } </Typography >
131+ </Tag >
132+ <img src = " /assets/icons/upper-right-arrow.svg" class = " footer-icon" />
133+ </footer >
134+ </a >
135+ ))}
136+ </div >
137+ ))
138+ }
139+ </div >
140+ </section >
141+ <section class =" mobile" >
142+ <JourneyTabGrid header =" Start your Chainlink journey" tabs ={ tabs } client:only =" react" />
143+ </section >
127144</section >
128145
129146<style >
147+ .desktop {
148+ display: none;
149+ }
150+
151+ .mobile {
152+ display: block;
153+ }
154+
130155 .journey-cards {
131156 display: grid;
132- grid-template-columns: 1fr;
157+ grid-template-columns: repeat(3, 1fr) ;
133158 }
134159
135160 .journey-column {
@@ -143,6 +168,10 @@ const columns = [
143168 padding: var(--space-6x);
144169 }
145170
171+ .footer-tag {
172+ text-transform: uppercase;
173+ }
174+
146175 .journey-card:hover {
147176 background-color: var(--muted);
148177
@@ -201,9 +230,13 @@ const columns = [
201230 border-left: 3px solid var(--brand);
202231 }
203232
204- @media (min-width: 50em) {
205- .journey-cards {
206- grid-template-columns: repeat(3, 1fr);
233+ @media (min-width: 769px) {
234+ .desktop {
235+ display: block;
236+ }
237+
238+ .mobile {
239+ display: none;
207240 }
208241
209242 .column-title {
0 commit comments