Skip to content

Commit 6a25293

Browse files
authored
Added or repaired dark mode for several tables, improved icons for the operator index page, added intro link and callout to Blueprint page, updated copy on discord button and added AI/ML use case (#38)
* updated discord button to "Connect" * added AIML use case * added link to introduction on blueprint page * added or fixed dark mode for tables * updated icons for operator index * ran prettier * prettier, dark mode fix for landing page * linkfix * fix runtime issue * fixd logo color in dark mode * added new blueprint graphic
1 parent 4fecaba commit 6a25293

10 files changed

+137
-113
lines changed

components/AllocationTable.tsx

Lines changed: 85 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,81 @@
1-
import React from "react";
2-
import styled from "styled-components";
1+
import React, { ReactNode } from "react";
32

4-
const TableContainer = styled.div`
5-
overflow-x: auto;
6-
margin: 20px;
7-
`;
3+
interface HeaderCellProps {
4+
children: ReactNode;
5+
}
6+
7+
const HeaderCell = ({ children }: HeaderCellProps) => (
8+
<th className="py-2 px-3 bg-gray-100 font-semibold border border-gray-300 dark:bg-gray-700 dark:border-gray-600 whitespace-nowrap">
9+
{children}
10+
</th>
11+
);
812

9-
const Table = styled.table`
10-
width: 100%;
11-
border-collapse: collapse;
12-
text-align: left;
13-
font-size: 14px;
13+
interface CellProps {
14+
children: ReactNode;
15+
}
1416

15-
@media (max-width: 768px) {
16-
font-size: 12px;
17-
}
18-
`;
17+
const Cell = ({ children }: CellProps) => (
18+
<td className="py-2 px-3 border border-gray-300 dark:border-gray-600 whitespace-nowrap">
19+
{children}
20+
</td>
21+
);
22+
23+
interface RowProps {
24+
children: ReactNode;
25+
isEven: boolean;
26+
}
1927

20-
const Header = styled.th`
21-
background-color: #f1f1f1;
22-
padding: 12px;
23-
font-weight: bold;
24-
border: 1px solid #ddd;
25-
white-space: nowrap;
26-
`;
28+
const Row = ({ children, isEven }: RowProps) => (
29+
<tr
30+
className={`border-b ${
31+
isEven ? "bg-gray-100 dark:bg-gray-700" : "dark:bg-gray-800"
32+
}`}
33+
>
34+
{children}
35+
</tr>
36+
);
2737

28-
const Row = styled.tr`
29-
&:nth-child(even) {
30-
background-color: #f9f9f9;
31-
}
32-
`;
38+
interface SubtotalRowProps {
39+
children: ReactNode;
40+
}
3341

34-
const SubtotalRow = styled(Row)`
35-
background-color: #e6f2ff !important;
36-
font-weight: bold;
37-
`;
42+
const SubtotalRow = ({ children }: SubtotalRowProps) => (
43+
<tr className="bg-blue-100 font-semibold dark:bg-blue-900 dark:text-blue-300">
44+
{children}
45+
</tr>
46+
);
3847

39-
const TotalRow = styled(Row)`
40-
background-color: #d9ead3;
41-
font-weight: bold;
42-
`;
48+
interface TotalRowProps {
49+
children: ReactNode;
50+
}
4351

44-
const Cell = styled.td`
45-
padding: 12px;
46-
border: 1px solid #ddd;
47-
white-space: nowrap;
48-
`;
52+
const TotalRow = ({ children }: TotalRowProps) => (
53+
<tr className="bg-green-100 font-semibold dark:bg-green-900 dark:text-green-300">
54+
{children}
55+
</tr>
56+
);
4957

5058
export default function AllocationTable() {
5159
return (
52-
<TableContainer>
53-
<Table>
60+
<div className="overflow-x-auto m-5">
61+
<table className="w-full border-collapse text-left text-sm text-gray-800 dark:text-gray-300">
5462
<thead>
55-
<Row>
56-
<Header>Allocation Category</Header>
57-
<Header>Entity Name</Header>
58-
<Header>Allocated Share (%)</Header>
59-
<Header>Vesting Plan</Header>
60-
<Header>Cliff (Months)</Header>
61-
<Header>Vesting Period (Months)</Header>
62-
<Header>Immediate Liquidity (%)</Header>
63-
<Header>Initial Liquid Tokens</Header>
64-
<Header>Cliff-Release Tokens</Header>
65-
<Header>Monthly Vesting Rate</Header>
66-
<Header>Total Tokens Allocated</Header>
67-
</Row>
63+
<TotalRow>
64+
<HeaderCell>Allocation Category</HeaderCell>
65+
<HeaderCell>Entity Name</HeaderCell>
66+
<HeaderCell>Allocated Share (%)</HeaderCell>
67+
<HeaderCell>Vesting Plan</HeaderCell>
68+
<HeaderCell>Cliff (Months)</HeaderCell>
69+
<HeaderCell>Vesting Period (Months)</HeaderCell>
70+
<HeaderCell>Immediate Liquidity (%)</HeaderCell>
71+
<HeaderCell>Initial Liquid Tokens</HeaderCell>
72+
<HeaderCell>Cliff-Release Tokens</HeaderCell>
73+
<HeaderCell>Monthly Vesting Rate</HeaderCell>
74+
<HeaderCell>Total Tokens Allocated</HeaderCell>
75+
</TotalRow>
6876
</thead>
6977
<tbody>
70-
<Row>
78+
<Row isEven={false}>
7179
<Cell>Contributors</Cell>
7280
<Cell>Webb (Developer)</Cell>
7381
<Cell>28.56500%</Cell>
@@ -80,7 +88,7 @@ export default function AllocationTable() {
8088
<Cell>2,380,416.67</Cell>
8189
<Cell>28,565,000.00</Cell>
8290
</Row>
83-
<Row>
91+
<Row isEven={true}>
8492
<Cell>Contributors</Cell>
8593
<Cell>Investors</Cell>
8694
<Cell>13.64000%</Cell>
@@ -93,7 +101,7 @@ export default function AllocationTable() {
93101
<Cell>1,136,666.67</Cell>
94102
<Cell>13,640,000.00</Cell>
95103
</Row>
96-
<Row>
104+
<Row isEven={false}>
97105
<Cell>Contributors</Cell>
98106
<Cell>Indiv. Contributors</Cell>
99107
<Cell>1.43500%</Cell>
@@ -107,17 +115,17 @@ export default function AllocationTable() {
107115
<Cell>1,435,000.00</Cell>
108116
</Row>
109117
<SubtotalRow>
110-
<Cell colSpan={2}>
118+
<Cell col-Span={2}>
111119
<strong>Contributors Total</strong>
112120
</Cell>
113121
<Cell>43.64000%</Cell>
114-
<Cell colSpan={4}></Cell>
122+
<td colSpan={4}></td>
115123
<Cell>0.00</Cell>
116124
<Cell>21,820,000.00</Cell>
117-
<Cell colSpan={1}></Cell>
125+
<td colSpan={1}></td>
118126
<Cell>43,640,000.00</Cell>
119127
</SubtotalRow>
120-
<Row>
128+
<Row isEven={true}>
121129
<Cell>Governance-Managed</Cell>
122130
<Cell>On-chain Treasury</Cell>
123131
<Cell>36.36000%</Cell>
@@ -130,7 +138,7 @@ export default function AllocationTable() {
130138
<Cell>n/a</Cell>
131139
<Cell>36,360,000.00</Cell>
132140
</Row>
133-
<Row>
141+
<Row isEven={false}>
134142
<Cell>Governance-Managed</Cell>
135143
<Cell>Foundation</Cell>
136144
<Cell>15.00000%</Cell>
@@ -144,17 +152,17 @@ export default function AllocationTable() {
144152
<Cell>15,000,000.00</Cell>
145153
</Row>
146154
<SubtotalRow>
147-
<Cell colSpan={2}>
155+
<Cell col-Span={2}>
148156
<strong>Governance-Managed Total</strong>
149157
</Cell>
150158
<Cell>51.36000%</Cell>
151-
<Cell colSpan={4}></Cell>
159+
<td colSpan={4}></td>
152160
<Cell>750,000.00</Cell>
153161
<Cell>593,750.00</Cell>
154-
<Cell colSpan={1}></Cell>
162+
<td colSpan={1}></td>
155163
<Cell>51,360,000.00</Cell>
156164
</SubtotalRow>
157-
<Row>
165+
<Row isEven={true}>
158166
<Cell>Airdrop Pool</Cell>
159167
<Cell>Leaderboard Participants</Cell>
160168
<Cell>2.00000%</Cell>
@@ -167,7 +175,7 @@ export default function AllocationTable() {
167175
<Cell>82,608.70</Cell>
168176
<Cell>2,000,000.00</Cell>
169177
</Row>
170-
<Row>
178+
<Row isEven={false}>
171179
<Cell>Airdrop Pool</Cell>
172180
<Cell>DOT Validators Snapshot</Cell>
173181
<Cell>1.00000%</Cell>
@@ -180,7 +188,7 @@ export default function AllocationTable() {
180188
<Cell>41,304.35</Cell>
181189
<Cell>1,000,000.00</Cell>
182190
</Row>
183-
<Row>
191+
<Row isEven={true}>
184192
<Cell>Airdrop Pool</Cell>
185193
<Cell>EDG Genesis Participants</Cell>
186194
<Cell>1.00000%</Cell>
@@ -193,7 +201,7 @@ export default function AllocationTable() {
193201
<Cell>41,304.35</Cell>
194202
<Cell>1,000,000.00</Cell>
195203
</Row>
196-
<Row>
204+
<Row isEven={false}>
197205
<Cell>Airdrop Pool</Cell>
198206
<Cell>EDG 2023 Snapshot</Cell>
199207
<Cell>1.00000%</Cell>
@@ -207,28 +215,28 @@ export default function AllocationTable() {
207215
<Cell>1,000,000.00</Cell>
208216
</Row>
209217
<SubtotalRow>
210-
<Cell colSpan={2}>
218+
<Cell col-Span={2}>
211219
<strong>Airdrop Pools Subtotal</strong>
212220
</Cell>
213221
<Cell>5.00000%</Cell>
214-
<Cell colSpan={4}></Cell>
222+
<td colSpan={4}></td>
215223
<Cell>250,000.00</Cell>
216224
<Cell>197,916.67</Cell>
217225
<Cell>206,521.74</Cell>
218226
<Cell>5,000,000.00</Cell>
219227
</SubtotalRow>
220228
<TotalRow>
221-
<Cell colSpan={2}>
229+
<Cell col-Span={2}>
222230
<strong>Total Supply</strong>
223231
</Cell>
224232
<Cell>100.00000%</Cell>
225-
<Cell colSpan={4}></Cell>
233+
<td colSpan={4}></td>
226234
<Cell>1,000,000.00</Cell>
227-
<Cell colSpan={2}></Cell>
235+
<td colSpan={2}></td>
228236
<Cell>100,000,000.00</Cell>
229237
</TotalRow>
230238
</tbody>
231-
</Table>
232-
</TableContainer>
239+
</table>
240+
</div>
233241
);
234242
}

components/CallToActionCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const CallToActionCard = ({ icon, title, description, link }) => {
44
return (
55
<a
66
href={link}
7-
className="max-w-sm min-h-44 flex items-start hover:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-700"
7+
className="max-w-sm min-h-44 p-2 flex items-start hover:bg-gray-100 dark:hover:bg-gray-700"
88
>
99
<div className="flex items-start">
1010
<div className="mr-4">

components/HeaderLogo.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ function HeaderLogo() {
2828
</g>
2929
<path
3030
d="M193.24 76.392V132H179.632V76.392H193.24ZM161.992 82.44V69.84H210.88V82.44H161.992ZM227.615 133.092C223.191 133.092 219.663 131.888 217.031 129.48C214.455 127.016 213.167 123.74 213.167 119.652C213.167 115.788 214.483 112.708 217.115 110.412C219.803 108.116 223.667 106.772 228.707 106.38L240.467 105.456V104.784C240.467 103.384 240.187 102.236 239.627 101.34C239.067 100.388 238.255 99.688 237.191 99.24C236.183 98.736 234.895 98.484 233.327 98.484C230.583 98.484 228.483 98.988 227.027 99.996C225.627 101.004 224.927 102.46 224.927 104.364H214.175C214.175 101.172 214.987 98.4 216.611 96.048C218.235 93.696 220.531 91.876 223.499 90.588C226.523 89.3 230.023 88.656 233.999 88.656C238.087 88.656 241.531 89.384 244.331 90.84C247.187 92.296 249.343 94.424 250.799 97.224C252.311 100.024 253.067 103.44 253.067 107.472V132H241.643L240.803 126.456C240.131 128.36 238.535 129.956 236.015 131.244C233.551 132.476 230.751 133.092 227.615 133.092ZM232.151 123.516C234.615 123.516 236.631 122.928 238.199 121.752C239.767 120.52 240.551 118.7 240.551 116.292V114.024L233.999 114.612C231.199 114.836 229.211 115.312 228.035 116.04C226.915 116.712 226.355 117.72 226.355 119.064C226.355 120.576 226.831 121.696 227.783 122.424C228.735 123.152 230.191 123.516 232.151 123.516ZM280.321 132H267.385V90H279.565L280.405 94.368C281.693 92.576 283.457 91.176 285.697 90.168C287.993 89.16 290.513 88.656 293.257 88.656C298.241 88.656 302.105 90.196 304.849 93.276C307.649 96.3 309.049 100.556 309.049 106.044V132H296.113V109.152C296.113 106.52 295.441 104.42 294.097 102.852C292.753 101.228 290.961 100.416 288.721 100.416C286.145 100.416 284.101 101.2 282.589 102.768C281.077 104.28 280.321 106.352 280.321 108.984V132ZM321.267 110.244C321.267 105.988 322.107 102.236 323.787 98.988C325.523 95.74 327.903 93.192 330.927 91.344C334.007 89.496 337.507 88.572 341.427 88.572C344.731 88.572 347.559 89.244 349.911 90.588C352.319 91.932 353.971 93.696 354.867 95.88L353.607 96.72L354.615 90H366.795V129.312C366.795 134.296 365.871 138.58 364.023 142.164C362.175 145.804 359.543 148.576 356.127 150.48C352.711 152.44 348.595 153.42 343.779 153.42C337.339 153.42 332.103 151.684 328.071 148.212C324.039 144.796 321.715 140.12 321.099 134.184H334.203C334.315 136.536 335.211 138.356 336.891 139.644C338.571 140.988 340.839 141.66 343.695 141.66C346.831 141.66 349.295 140.792 351.087 139.056C352.935 137.32 353.859 134.968 353.859 132V123.096L355.287 124.188C354.391 126.372 352.655 128.136 350.079 129.48C347.503 130.824 344.535 131.496 341.175 131.496C337.255 131.496 333.783 130.6 330.759 128.808C327.791 127.016 325.467 124.524 323.787 121.332C322.107 118.14 321.267 114.444 321.267 110.244ZM334.287 109.908C334.287 111.924 334.707 113.716 335.547 115.284C336.387 116.796 337.535 118 338.991 118.896C340.447 119.792 342.127 120.24 344.031 120.24C345.991 120.24 347.699 119.82 349.155 118.98C350.667 118.084 351.815 116.88 352.599 115.368C353.439 113.8 353.859 111.98 353.859 109.908C353.859 107.836 353.439 106.072 352.599 104.616C351.815 103.104 350.667 101.928 349.155 101.088C347.699 100.248 345.963 99.828 343.947 99.828C342.043 99.828 340.363 100.248 338.907 101.088C337.451 101.928 336.303 103.104 335.463 104.616C334.679 106.128 334.287 107.892 334.287 109.908ZM394.499 132H381.563V68.664H394.499V132ZM428.731 133.092C424.531 133.092 420.779 132.14 417.475 130.236C414.227 128.332 411.651 125.728 409.747 122.424C407.899 119.064 406.975 115.228 406.975 110.916C406.975 106.548 407.871 102.712 409.663 99.408C411.511 96.048 414.059 93.416 417.307 91.512C420.555 89.608 424.279 88.656 428.479 88.656C432.903 88.656 436.711 89.58 439.903 91.428C443.095 93.22 445.559 95.796 447.295 99.156C449.031 102.46 449.899 106.408 449.899 111V114.276L413.779 114.444L413.947 106.464H437.047C437.047 104.224 436.291 102.46 434.779 101.172C433.267 99.828 431.195 99.156 428.563 99.156C426.379 99.156 424.587 99.576 423.187 100.416C421.843 101.256 420.835 102.572 420.163 104.364C419.491 106.1 419.155 108.34 419.155 111.084C419.155 115.004 419.939 117.916 421.507 119.82C423.131 121.668 425.623 122.592 428.983 122.592C431.447 122.592 433.491 122.172 435.115 121.332C436.739 120.492 437.775 119.316 438.223 117.804H450.067C449.339 122.452 447.043 126.176 443.179 128.976C439.315 131.72 434.499 133.092 428.731 133.092Z"
31-
fill="#1F1D2B"
31+
fill="currentColor"
32+
className=" fill-[#1F1D2B] dark:fill-white"
3233
/>
3334
<defs>
3435
<linearGradient

components/HelpDiscordBtn.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const HelpDiscordBtn: React.FC = () => {
2222
/>
2323
</g>
2424
</svg>
25-
<span className="hidden lg:inline text-xs lg:text-sm">Get Help</span>
25+
<span className="hidden lg:inline text-xs lg:text-sm">Connect</span>
2626
</button>
2727
</div>
2828
</a>

components/NetworkConfig.tsx

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ const NetworkTabs = () => {
168168
case "wss":
169169
return (
170170
<div className="flex items-center">
171-
<span className="mr-2 bg-slate-200 font-mono text-sm py-1 px-3">
171+
<span className="mr-2 bg-slate-200 font-mono dark:bg-black dark:text-white text-sm py-1 px-3">
172172
{value.url}
173173
</span>
174174
<BlockCopyButton name={value.url} code={value.url} />
@@ -178,7 +178,7 @@ const NetworkTabs = () => {
178178
return (
179179
<Link
180180
href={value.url}
181-
className="underline underline-offset-1 text-linkBlue font-semibold"
181+
className="underline underline-offset-1 dark:text-blue-200 text-linkBlue font-semibold"
182182
target="_blank"
183183
rel="noopener noreferrer"
184184
>
@@ -207,14 +207,17 @@ const NetworkTabs = () => {
207207
{Object.entries(sections).map(([section, items]) => (
208208
<div key={section} className="mb-8">
209209
<h3 className="text-xl font-semibold mb-2">{section}</h3>
210-
<table className="w-full border-collapse">
210+
<table className="w-full border-collapse bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-300">
211211
<tbody>
212212
{(items as any[]).map((item, index) => (
213-
<tr className="border-b" key={index}>
214-
<td className="px-4 py-2 whitespace-nowrap bg-slate-100">
213+
<tr
214+
className={`${index % 2 === 0 ? "bg-gray-50 dark:bg-gray-700" : ""} border-b`}
215+
key={index}
216+
>
217+
<td className="px-4 py-2 whitespace-nowrap bg-slate-100 dark:bg-gray-600 border border-gray-300 dark:border-gray-700">
215218
{item.property}
216219
</td>
217-
<td className="px-4 py-2 truncate text-ellipsis">
220+
<td className="px-4 py-2 truncate text-ellipsis border border-gray-300 dark:border-gray-700">
218221
{renderValue(item.value)}
219222
</td>
220223
</tr>
@@ -229,8 +232,8 @@ const NetworkTabs = () => {
229232

230233
return (
231234
<div className="mt-10">
232-
<ul className="flex flex-wrap -mb-px text-sm font-medium text-center text-gray-500 dark:text-gray-400">
233-
<li className="inline-flex text-xl items-center justify-center p-4 border-b-2 border-transparent rounded-t-lg group">
235+
<ul className="flex flex-wrap mb-8 text-sm border-b-2 font-medium text-center text-gray-500 dark:text-gray-400">
236+
<li className="inline-flex text-xl items-center justify-center pt-8 px-4 border-b-2 border-transparent rounded-t-lg group">
234237
<a
235238
href="#"
236239
onClick={() => handleTabClick("mainnet")}
@@ -244,7 +247,8 @@ const NetworkTabs = () => {
244247
Mainnet
245248
</a>
246249
</li>
247-
<li className="inline-flex text-xl items-center justify-center p-4 border-b-2 border-transparent rounded-t-lg group">
250+
<li className="inline-flex text-xl items-center justify-center pt-8 px-4 border-b-2 border-transparent rounded-t-lg group">
251+
{" "}
248252
<a
249253
href="#"
250254
onClick={() => handleTabClick("testnet")}
@@ -258,7 +262,8 @@ const NetworkTabs = () => {
258262
Testnet
259263
</a>
260264
</li>
261-
<li className="inline-flex items-center justify-center p-4 border-b-2 border-transparent text-xl rounded-t-lg group">
265+
<li className="inline-flex text-xl items-center justify-center pt-8 px-4 border-b-2 border-transparent rounded-t-lg group">
266+
{" "}
262267
<a
263268
href="#"
264269
onClick={() => handleTabClick("wallets")}

0 commit comments

Comments
 (0)