Skip to content

Commit 0fd62f7

Browse files
committed
Improve wallet grid layout with dynamic column sizing
1 parent 095fb7a commit 0fd62f7

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-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: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,27 @@ a.card:hover h3 {
150150
.light .circled-logo {
151151
border: none;
152152
}
153-
153+
.cols-of-1{
154+
grid-template-rows:repeat(1, min-content)
155+
}
156+
.cols-of-2{
157+
grid-template-rows:repeat(2, min-content)
158+
}
159+
.cols-of-3{
160+
grid-template-rows:repeat(3, min-content)
161+
}
162+
.cols-of-4{
163+
grid-template-rows:repeat(4, min-content)
164+
}
165+
.cols-of-5{
166+
grid-template-rows:repeat(5, min-content)
167+
}
168+
.cols-of-6{
169+
grid-template-rows:repeat(6, min-content)
170+
}
171+
.cols-of-7{
172+
grid-template-rows:repeat(7, min-content)
173+
}
154174
.card-deck {
155175
margin-top: 2.5rem;
156176
margin-left: (-$card-deck-margin);

0 commit comments

Comments
 (0)