Skip to content

Commit c363ddb

Browse files
authored
Merge pull request #3018 from XRPLF/issue-2832
Improve wallet grid layout with dynamic column sizing
2 parents a928e26 + 962c2e3 commit c363ddb

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

about/xrp.page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export default function XrpOverview() {
111111
window.removeEventListener("scroll", handleScroll);
112112
};
113113
}, []);
114-
114+
const totalCols = Math.max(softwallets.length, hardwallets.length) + 1;
115115
return (
116116
<div className="landing">
117117
<div>
@@ -376,7 +376,7 @@ export default function XrpOverview() {
376376
"Digital wallets are pieces of software that allow people to send, receive, and store cryptocurrencies, including XRP. There are two types of digital wallets: hardware and software."
377377
)}
378378
</h5>
379-
<ul className="nav nav-grid-lg cols-of-6" id="wallets">
379+
<ul className={`nav nav-grid-lg cols-of-${totalCols}`} id="wallets">
380380
<li className="nav-item nav-grid-head">
381381
<h6 className="fs-4-5">{translate("Software Wallets")}</h6>
382382
</li>

static/css/devportal2024-v1.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

styles/_cards.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,11 @@ a.card:hover h3 {
150150
.light .circled-logo {
151151
border: none;
152152
}
153-
153+
@for $i from 1 through 10 {
154+
.cols-of-#{$i} {
155+
grid-template-rows: repeat(#{$i}, min-content);
156+
}
157+
}
154158
.card-deck {
155159
margin-top: 2.5rem;
156160
margin-left: (-$card-deck-margin);

0 commit comments

Comments
 (0)