Skip to content

Commit def2ecd

Browse files
authored
Merge pull request #1345 from oasisprotocol/lw/homepage-refactor
Homepage refactor
2 parents 3679361 + a31e2b0 commit def2ecd

3 files changed

Lines changed: 51 additions & 60 deletions

File tree

docs/README.mdx

Lines changed: 46 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -6,62 +6,47 @@ import OasisSvg from "@site/static/img/OasisGraphic.svg?react";
66
import GetInvolvedSvg from "@site/static/img/GetInvolvedGraphic.svg?react";
77
import BuildSvg from "@site/static/img/BuildGraphic.svg?react";
88
import DevelopCoreSvg from "@site/static/img/DevelopCoreGraphic.svg?react";
9-
import NodeseSvg from "@site/static/img/NodesGraphic.svg?react";
9+
import NodesSvg from "@site/static/img/NodesGraphic.svg?react";
1010

1111
# Getting Started
1212

13-
<div className='homepage-container'>
14-
<DocCardSection
15-
title="Use Oasis"
16-
path="/general/"
17-
description="This introductory part contains general overview of the Oasis Network such as
13+
<div className="homepage-container">
14+
15+
<DocCardSection
16+
title="Use Oasis"
17+
path="/general/"
18+
itemPaths={[
19+
"/general/oasis-network/",
20+
"/general/manage-tokens/",
21+
"/general/manage-tokens/cli/",
22+
]}
23+
svg={
24+
<OasisSvg className="animatedSvg" />
25+
}
26+
>
27+
This introductory part contains general overview of the Oasis Network such as
1828
the distinction between the consensus layer and different ParaTimes. It
1929
also covers wallets and other tools for managing your assets across the Oasis
20-
chains and how to use unique Oasis features."
21-
itemPaths={[
22-
"/general/oasis-network/",
23-
"/general/manage-tokens/",
24-
"/general/manage-tokens/cli/",
25-
]}
26-
svg={
27-
<OasisSvg className="animatedSvg" />
28-
}
29-
/>
30+
chains and how to use unique Oasis features.
31+
</DocCardSection>
3032

3133
<DocCardSection
3234
title="Get Involved"
3335
path="/get-involved/"
34-
description="Contains information on official channels to get in touch with the Oasis Network developers and how to contribute to the network."
3536
itemPaths={[
3637
"/get-involved/",
3738
"https://oasisrose.garden",
3839
"/get-involved/run-node",
3940
"/get-involved/oasis-core",
4041
]}
4142
svg={<GetInvolvedSvg className="animatedSvg" />}
42-
/>
43+
>
44+
Contains information on official channels to get in touch with the Oasis Network developers and how to contribute to the network.
45+
</DocCardSection>
4346

4447
<DocCardSection
4548
title="Build on Oasis"
4649
path="/build/"
47-
description={
48-
<>
49-
Contains learning material for the smart contract developers. Since the
50-
Oasis platform is best known for confidentiality, the most notable
51-
ParaTime is <a href="/build/sapphire/">Oasis Sapphire</a>, an
52-
EVM-compatible ParaTime with built-in contract state encryption. The Oasis
53-
team also prepared a set of libraries called the
54-
<a href="/build/opl/">Oasis Privacy Layer</a> to bridge existing dApps running
55-
on other chains and use the unique Sapphire's confidentiality.
56-
<br />
57-
<br />
58-
Our <a href="/build/rofl/">Runtime Offchain Logic (ROFL)</a> enables you
59-
to build secure applications running offchain in a trusted environment
60-
(TEE) that seamlessly communicate with Oasis Sapphire. This is ideal for
61-
trusted oracles, compute-expensive tasks in AI, or as a backend for
62-
interactive games.
63-
</>
64-
}
6550
fullWidth
6651
itemPaths={[
6752
"/build/sapphire/",
@@ -70,36 +55,48 @@ import NodeseSvg from "@site/static/img/NodesGraphic.svg?react";
7055
"/build/tools/",
7156
]}
7257
svg={<BuildSvg className="animatedSvg" />}
73-
/>
58+
>
59+
Contains learning material for the smart contract developers. Since the
60+
Oasis platform is best known for confidentiality, the most notable
61+
ParaTime is [Oasis Sapphire](/build/sapphire/), an
62+
EVM-compatible ParaTime with built-in contract state encryption. The Oasis
63+
team also prepared a set of libraries called the
64+
[Oasis Privacy Layer](/build/opl/) to bridge existing dApps running
65+
on other chains and use the unique Sapphire's confidentiality.
66+
67+
Our [Runtime Offchain Logic (ROFL)](/build/rofl/) enables you
68+
to build secure applications running offchain in a trusted environment
69+
(TEE) that seamlessly communicate with Oasis Sapphire. This is ideal for
70+
trusted oracles, compute-expensive tasks in AI, or as a backend for
71+
interactive games.
72+
</DocCardSection>
7473

7574
<DocCardSection
7675
title="Run Node"
7776
path="/node/"
78-
description="If you want to run your own Oasis node, this part will provide you with guides on the current Mainnet and Testnet network parameters and how to set up your node, let it be a validator node, perhaps running a ParaTime or just a simple client node for your server to submit transactions and perform queries on the network."
7977
itemPaths={[
8078
"/node/",
8179
"/node/mainnet/",
8280
"/node/testnet/",
8381
"/node/run-your-node/",
8482
]}
85-
svg={<NodeseSvg className="animatedSvg" />}
86-
/>
83+
svg={<NodesSvg className="animatedSvg" />}
84+
>
85+
If you want to run your own Oasis node, this part will provide you with guides on the current Mainnet and Testnet network parameters and how to set up your node, let it be a validator node, perhaps running a ParaTime or just a simple client node for your server to submit transactions and perform queries on the network.
86+
</DocCardSection>
8787

8888
<DocCardSection
8989
title="Develop Core"
9090
path="/core/"
91-
description={
92-
<>
93-
Whether you want to contribute your code to the core components of the Oasis Network or just learn more about the Oasis consensus layer and other core components, this is the part for you.
94-
<br/>
95-
<br/>
96-
Additions or changes to the interoperable Oasis network components are always made with consensus. Similar to the Ethereum's ERC/EIP mechanism Oasis follows formal Architectural Decision Records (ADRs) which are first proposed, voted on and finally implemented, if accepted.
97-
</>
98-
}
9991
itemPaths={[
10092
"/core/",
10193
"/adrs",
10294
]}
10395
svg={<DevelopCoreSvg className="animatedSvg" />}
104-
/>
96+
>
97+
Whether you want to contribute your code to the core components of the Oasis Network or just learn more about the Oasis consensus layer and other core components, this is the part for you.
98+
99+
Additions or changes to the interoperable Oasis network components are always made with consensus. Similar to the Ethereum's ERC/EIP mechanism Oasis follows formal Architectural Decision Records (ADRs) which are first proposed, voted on and finally implemented, if accepted.
100+
</DocCardSection>
101+
105102
</div>

src/components/DocCardSection.module.css

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
position: relative;
1010
overflow: hidden;
1111
transition: background 0.5s ease;
12-
position: relative;
13-
overflow: hidden;
1412
}
1513

1614
.customCard::before {
@@ -20,7 +18,7 @@
2018
background: linear-gradient(0deg, rgba(255, 255, 255, 0.00) 53.75%, #5FA8D3 180%);
2119
opacity: 0;
2220
transition: opacity 0.5s ease;
23-
z-index: 0;
21+
z-index: -1;
2422
}
2523

2624

@@ -32,13 +30,11 @@
3230
.fullWidth {
3331
flex: 1 1 100%;
3432
max-width: 100%;
35-
position: relative;
3633
}
3734

3835
.customCard h2 {
3936
font-size: 2rem;
4037
margin: 0 0 0.5rem 0;
41-
position: relative;
4238
color: var(--ifm-color-card-heading);
4339
}
4440

@@ -51,7 +47,6 @@
5147
font-size: 0.9rem;
5248
color: #64748b;
5349
margin-bottom: 1.5rem;
54-
position: relative;
5550
}
5651

5752
.cardItem {
@@ -133,7 +128,6 @@
133128
.halfWidth{
134129
width: 50%;
135130
max-width: calc(50% - 0.75rem);
136-
z-index: 1;
137131
}
138132

139133
.cardItem::after {

src/components/DocCardSection.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Link from "@docusaurus/Link";
77
type Props = {
88
title: string;
99
path:string;
10-
description: React.ReactNode;
10+
children: React.ReactNode;
1111
itemPaths: string[];
1212
fullWidth?: boolean;
1313
svg: React.ReactNode;
@@ -16,7 +16,7 @@ type Props = {
1616
export default function DocCardSection({
1717
title,
1818
path,
19-
description,
19+
children,
2020
itemPaths,
2121
fullWidth,
2222
svg,
@@ -65,7 +65,7 @@ export default function DocCardSection({
6565
<h2 className="section-title">
6666
<Link to={path}>{title}</Link>
6767
</h2>
68-
<p className={styles.cardDescription}>{description}</p>
68+
<p className={styles.cardDescription}>{children}</p>
6969
</div>
7070

7171
<div className={`${styles.cardLinksList} ${fullWidth && styles.halfWidth}`}>
@@ -78,4 +78,4 @@ export default function DocCardSection({
7878
</div>
7979
</div>
8080
);
81-
}
81+
}

0 commit comments

Comments
 (0)