Skip to content

Commit 259bd63

Browse files
committed
feat(docs): enhance Flare launch page with new protocols and tags
1 parent b5bc6c9 commit 259bd63

3 files changed

Lines changed: 75 additions & 18 deletions

File tree

docs/1-intro.mdx

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ keywords:
3030
import ThemedImage from "@theme/ThemedImage";
3131
import useBaseUrl from "@docusaurus/useBaseUrl";
3232
import DocCard from "@theme/DocCard";
33+
import CopyButton from "@site/src/components/CopyButton";
3334

3435
Start building on Flare, the interoperable EVM L1 engineered for a data-rich, interconnected future.
3536
Flare Developer Hub is your central resource, containing the tutorials, SDKs, and API documentation you need to succeed.
@@ -64,12 +65,12 @@ Dive in to Flare's enshrined data, fast finality, and soon, verifiable compute w
6465
</div>
6566
</div>
6667

67-
| Network | Flare Mainnet | Flare Testnet Coston2 |
68-
| :----------- | :----------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- |
69-
| **RPC** | `https://flare-api.flare.network/ext/C/rpc` | `https://coston2-api.flare.network/ext/C/rpc` |
70-
| **Chain ID** | `14` | `114` |
71-
| **Explorer** | [`https://flare-explorer.flare.network`](https://flare-explorer.flare.network) | [`https://coston2-explorer.flare.network`](https://coston2-explorer.flare.network) |
72-
| **Faucet** | N/A | Request C2FLR from the [Coston2 Faucet](https://faucet.flare.network/coston2) |
68+
| Network | Flare Mainnet | Flare Testnet Coston2 |
69+
| :----------- | :------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------- |
70+
| **RPC** | <code>flare-api.flare.network/ext/C/rpc</code> <CopyButton textToCopy="https://flare-api.flare.network/ext/C/rpc" /> | <code>coston2-api.flare.network/ext/C/rpc</code> <CopyButton textToCopy="https://coston2-api.flare.network/ext/C/rpc" /> |
71+
| **Chain ID** | <code>14</code> <CopyButton textToCopy="14" /> | <code>114</code> <CopyButton textToCopy="114" /> |
72+
| **Explorer** | [`https://flare-explorer.flare.network`](https://flare-explorer.flare.network) | [`https://coston2-explorer.flare.network`](https://coston2-explorer.flare.network) |
73+
| **Faucet** | N/A | Request C2FLR, FXRP and USDT0 from the [Coston2 Faucet](https://faucet.flare.network/coston2) |
7374

7475
Additional configuration and API resources are detailed on the [Network](/network/overview) page.
7576

@@ -78,25 +79,24 @@ Additional configuration and API resources are detailed on the [Network](/networ
7879
<div className="row">
7980
<div className="col col--6 margin-bottom--lg">
8081
<DocCard
82+
tag="New"
8183
item={{
8284
type: "link",
83-
label: "Flare Time Series Oracle (FTSOv2)",
84-
href: "/ftso/getting-started",
85-
description:
86-
"Easily integrate fast, secure, and decentralized price feeds.",
85+
label: "Flare Smart Accounts",
86+
href: "/smart-accounts/overview",
87+
description: "Account abstraction for XRPL users on Flare.",
8788
docId: undefined,
8889
}}
8990
/>
9091
</div>
9192
<div className="col col--6 margin-bottom--lg">
9293
<DocCard
93-
tag="Coming Soon"
94+
tag="New"
9495
item={{
9596
type: "link",
96-
label: "Flare Data Connector (FDC)",
97-
href: "/fdc/getting-started",
98-
description:
99-
"Reliably access external blockchain events and real-world APIs.",
97+
label: "FXRP",
98+
href: "/fxrp/overview",
99+
description: "Use XRP on Flare via trustless FAssets.",
100100
docId: undefined,
101101
}}
102102
/>
@@ -112,6 +112,30 @@ Additional configuration and API resources are detailed on the [Network](/networ
112112
}}
113113
/>
114114
</div>
115+
<div className="col col--6 margin-bottom--lg">
116+
<DocCard
117+
item={{
118+
type: "link",
119+
label: "Flare Time Series Oracle (FTSOv2)",
120+
href: "/ftso/getting-started",
121+
description:
122+
"Easily integrate fast, secure, and decentralized price feeds.",
123+
docId: undefined,
124+
}}
125+
/>
126+
</div>
127+
<div className="col col--6 margin-bottom--lg">
128+
<DocCard
129+
item={{
130+
type: "link",
131+
label: "Flare Data Connector (FDC)",
132+
href: "/fdc/getting-started",
133+
description:
134+
"Reliably access external blockchain events and real-world APIs.",
135+
docId: undefined,
136+
}}
137+
/>
138+
</div>
115139
<div className="col col--6 margin-bottom--lg">
116140
<DocCard
117141
item={{

src/theme/DocCard/index.tsx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,16 @@ function CardLayout({
5555
href,
5656
title,
5757
description,
58+
tag,
5859
}: {
5960
href: string;
6061
title: string;
6162
description?: string;
63+
tag?: string;
6264
}): JSX.Element {
6365
return (
6466
<CardContainer href={href}>
67+
{tag && <span className={styles.cardTag}>{tag}</span>}
6568
<div className={styles.cardHeader}>
6669
<Heading
6770
as="h2"
@@ -117,21 +120,31 @@ function CardCategory({
117120
);
118121
}
119122

120-
function CardLink({ item }: { item: PropSidebarItemLink }): JSX.Element {
123+
function CardLink({
124+
item,
125+
tag,
126+
}: {
127+
item: PropSidebarItemLink;
128+
tag?: string;
129+
}): JSX.Element {
121130
const doc = useDocById(item.docId ?? undefined);
122131
return (
123132
<CardLayout
124133
href={item.href}
125134
title={item.label}
126135
description={item.description ?? doc?.description}
136+
tag={tag}
127137
/>
128138
);
129139
}
130140

131-
export default function DocCard({ item }: Props): JSX.Element {
141+
export default function DocCard({
142+
item,
143+
tag,
144+
}: Props & { tag?: string }): JSX.Element {
132145
switch (item.type) {
133146
case "link":
134-
return <CardLink item={item} />;
147+
return <CardLink item={item} tag={tag} />;
135148
case "category":
136149
return <CardCategory item={item} />;
137150
default:

src/theme/DocCard/styles.module.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
--ifm-link-color: var(--ifm-color-emphasis-800);
33
--ifm-link-hover-color: var(--ifm-color-emphasis-700);
44
--ifm-link-hover-decoration: none;
5+
position: relative;
6+
overflow: visible;
57
transition: all var(--ifm-transition-fast) ease;
68
transition-property: border, box-shadow;
79
color: var(--ifm-color-primary);
@@ -45,6 +47,24 @@
4547
justify-content: space-between;
4648
}
4749

50+
.cardTag {
51+
position: absolute;
52+
top: 0.5rem;
53+
left: 0.5rem;
54+
font-size: 0.65rem;
55+
font-weight: 600;
56+
text-transform: uppercase;
57+
letter-spacing: 0.02em;
58+
padding: 0.15rem 0.4rem;
59+
border-radius: 4px;
60+
background-color: var(--ifm-color-primary);
61+
color: var(--ifm-font-color-base-inverse);
62+
}
63+
[data-theme="dark"] .cardTag {
64+
background-color: var(--ifm-color-primary);
65+
color: #ffffff;
66+
}
67+
4868
.cardArrow {
4969
color: #000000;
5070
}

0 commit comments

Comments
 (0)