Skip to content

Commit

Permalink
fix: table responsiveness and ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
bharathbabu-moralis committed Jan 8, 2025
1 parent 0f55653 commit b170b28
Show file tree
Hide file tree
Showing 3 changed files with 200 additions and 81 deletions.
86 changes: 73 additions & 13 deletions docs/01-web3-data-api/evm/supported-chains.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,79 @@ This table displays the Web3Data APIs supported by each protocol.
<table>
<thead>
<tr>
<th>Protocol</th>
<th>Wallet API</th>
<th>NFT API</th>
<th>Token API</th>
<th>DeFi API</th>
<th>Entity API</th>
<th>Blockchain API</th>
<th>Profitability API</th>
<th>Token Prices</th>
<th>NFT Trades</th>
<th>NFT Trade Prices</th>
<th>NFT Floor Prices</th>
<th>Internal Transactions</th>
<th className="protocol-column">Protocol</th>
<th>
<div className="stacked-header">
<span>Wallet</span>
<span>API</span>
</div>
</th>
<th>
<div className="stacked-header">
<span>NFT</span>
<span>API</span>
</div>
</th>
<th>
<div className="stacked-header">
<span>Token</span>
<span>API</span>
</div>
</th>
<th>
<div className="stacked-header">
<span>DeFi</span>
<span>API</span>
</div>
</th>
<th>
<div className="stacked-header">
<span>Entity</span>
<span>API</span>
</div>
</th>
<th>
<div className="stacked-header">
<span>Blockchain</span>
<span>API</span>
</div>
</th>
<th>
<div className="stacked-header">
<span>Profitability</span>
<span>API</span>
</div>
</th>
<th>
<div className="stacked-header">
<span>Token</span>
<span>Prices</span>
</div>
</th>
<th>
<div className="stacked-header">
<span>NFT</span>
<span>Trades</span>
</div>
</th>
<th>
<div className="stacked-header">
<span>NFT Trade</span>
<span>Prices</span>
</div>
</th>
<th>
<div className="stacked-header">
<span>NFT Floor</span>
<span>Prices</span>
</div>
</th>
<th>
<div className="stacked-header">
<span>Internal</span>
<span>Transactions</span>
</div>
</th>
</tr>
</thead>
<tbody>
Expand Down
86 changes: 43 additions & 43 deletions docs/configs/api-reference/evmChainData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ const chainData = [
logo: "/img/content/linea.png",
chainID: "0xe708 (59144)",
evmChain: "EvmChain.LINEA",
isNew: true,
isNew: false,
type: "Mainnet",
evmApi: {
supported: true,
Expand Down Expand Up @@ -538,7 +538,7 @@ const chainData = [
type: "Testnet",
chainID: "0xe705 (59141)",
evmChain: "EvmChain.LINEA_SEPOLIA",
isNew: true,
isNew: false,
evmApi: {
supported: true,
walletApi: true,
Expand Down Expand Up @@ -871,47 +871,6 @@ const chainData = [
supported: true,
},
},
{
name: "Pulsechain",
logo: "/img/content/pulsechain.png",
type: "Mainnet",
chainID: "0x171 (369)",
evmChain: "EvmChain.PULSECHAIN",
isNew: false,
evmApi: {
supported: true,
walletApi: true,
nftApi: false,
tokenApi: true,
defiApi: false,
entityApi: true,
blockchainApi: true,
pnlApi: false,
tokenPrices: true,
internalTxs: true,
nftTrades: false,
nftPrices: false,
nftFloorPrices: false,
queryParams: ["pulse", "0x171"],
},
streamsApi: {
supported: true,
blockConfirmations: "100",
internalTxs: false,
reason: "Unsupported",
},
rpcNodes: {
supported: true,
urls: [
"https://site1.moralis-nodes.com/pulse/",
"https://site2.moralis-nodes.com/pulse/",
],
},
authApi: {
supported: false,
reason: "Unsupported",
},
},
{
name: "Moonbeam",
logo: "/img/content/moonbeam.png",
Expand Down Expand Up @@ -1618,6 +1577,47 @@ const chainData = [
supported: false,
},
},
{
name: "Pulsechain",
logo: "/img/content/pulsechain.png",
type: "Mainnet",
chainID: "0x171 (369)",
evmChain: "EvmChain.PULSECHAIN",
isNew: true,
evmApi: {
supported: true,
walletApi: true,
nftApi: false,
tokenApi: true,
defiApi: false,
entityApi: true,
blockchainApi: true,
pnlApi: false,
tokenPrices: true,
internalTxs: true,
nftTrades: false,
nftPrices: false,
nftFloorPrices: false,
queryParams: ["pulse", "0x171"],
},
streamsApi: {
supported: true,
blockConfirmations: "100",
internalTxs: false,
reason: "Unsupported",
},
rpcNodes: {
supported: true,
urls: [
"https://site1.moralis-nodes.com/pulse/",
"https://site2.moralis-nodes.com/pulse/",
],
},
authApi: {
supported: false,
reason: "Unsupported",
},
},
] as const;

export default chainData;
109 changes: 84 additions & 25 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -1548,45 +1548,104 @@ li.dropdown-divider {
margin-top: -10px;
}

/* Custom class for Supported Web3Data APIs table */
/* Web3Data APIs table styles */
.supported-web3data-apis-table {
width: 100%;
overflow-x: auto;
margin: 20px 0;
}

.supported-web3data-apis-table table {
min-width: 100%;
width: 100%;
table-layout: fixed;
border-collapse: collapse;
margin-top: 20px;
border: 1px solid var(--ifm-table-border-color);
}

.supported-web3data-apis-table th,
.supported-web3data-apis-table td {
padding: 8px 6px;
text-align: left;
border: 1px solid var(--ifm-table-border-color);
vertical-align: middle;
font-size: 13px;
}

.supported-web3data-apis-table th {
background-color: var(--ifm-table-header-background-color);
color: var(--ifm-table-header-color);
font-weight: var(--ifm-font-weight-semibold);
}

.supported-web3data-apis-table td {
background-color: var(--ifm-background-color);
color: var(--ifm-color);
width: 7%;
}

.supported-web3data-apis-table .protocol-column {
width: 15%;
}

.supported-web3data-apis-table tr:nth-child(even) td {
background-color: var(--ifm-table-stripe-background);
}

th,
td {
padding: 12px 10px;
text-align: left;
border: 1px solid var(--ifm-table-border-color);
vertical-align: middle;
/* Stacked header styling */
.stacked-header {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
line-height: 1.2;
gap: 2px;
}

.stacked-header span {
display: block;
font-size: 13px;
}

/* Icon container */
.icon-container {
display: flex;
align-items: center;
justify-content: center;
}

/* For mobile devices */
@media (max-width: 1200px) {
.supported-web3data-apis-table table {
table-layout: auto;
width: max-content;
}

th {
background-color: var(--ifm-table-header-background-color);
color: var(--ifm-table-header-color);
text-align: left;
.supported-web3data-apis-table td {
min-width: 60px;
width: auto;
}

td {
background-color: var(--ifm-background-color);
color: var(--ifm-color);
.supported-web3data-apis-table .protocol-column {
min-width: 180px;
width: auto;
}
}

tr:nth-child(even) td {
background-color: var(--ifm-table-background-color);
@media (max-width: 768px) {
.supported-web3data-apis-table {
margin: 0 -16px;
border-left: 0;
border-right: 0;
}

img {
width: 20px;
height: 20px;
margin-right: 8px;
.supported-web3data-apis-table th,
.supported-web3data-apis-table td {
padding: 6px 4px;
font-size: 12px;
}

.icon-container {
display: flex;
align-items: center;
justify-content: center;
.stacked-header span {
font-size: 12px;
}
}

0 comments on commit b170b28

Please sign in to comment.